Last active
June 20, 2018 02:20
-
-
Save chnbohwr/74374774115005615be65ef2bd750169 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
| state = { | |
| list: [] | |
| }; | |
| clickBtn = () => { | |
| this.state.list.push({ | |
| id: Math.random(), | |
| name: randomStr.generate(4) | |
| }); | |
| this.setState(this.state); | |
| }; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment