Create a gist now

Instantly share code, notes, and snippets.

Embed
// ...
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