-
-
Save christiannwamba/40ad466f3753e4b8f325ef00b93e7075 to your computer and use it in GitHub Desktop.
This file contains 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
// ... | |
class Hamburger extends Component { | |
constructor(props) { | |
super(props); | |
this.state = { | |
toggleState: 0 | |
}; | |
this.handleClick = this.handleClick.bind(this); | |
} | |
handleClick() { | |
this.refs.container.classList.toggle('change'); | |
this.setState({ | |
toggleState: this.state.toggleState ? 0 : 1 | |
}); | |
} | |
} | |
// ... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment