Created
July 11, 2019 08:50
-
-
Save indreklasn/b6f87fa889baad8925fb7b24e6888ea7 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 Hello360 extends React.Component { | |
state = { | |
count: 0, | |
}; | |
// This method increments our count, triggering a re-render | |
incrementCount = () => { | |
this.setState({count: this.state.count + 1}); | |
}; | |
// This method decrements our count, triggering a re-render | |
decrementCount = () => { | |
this.setState({count: this.state.count - 1}); | |
}; | |
render() { | |
return (); | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment