Last active
December 23, 2017 13:34
-
-
Save eyalcohen4/a6ed486cb651931dda86de0235fb25e8 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export default class App extends React.Component { | |
state = { | |
mute: false, | |
shouldPlay: true, | |
} | |
handlePlayAndPause = () => { | |
this.setState((prevState) => ({ | |
shouldPlay: !prevState.shouldPlay | |
})); | |
} | |
handleVolume = () => { | |
this.setState(prevState => ({ | |
mute: !prevState.mute, | |
})); | |
} | |
// .... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment