Last active
June 8, 2020 02:05
-
-
Save euccas/52b27ad7b0a708ba2801b0b94e59b76e to your computer and use it in GitHub Desktop.
react setState
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
constructor(props) { | |
super(props) | |
this.state = { | |
userName: 'Azat Mardan', | |
userEmail: 'hi@azat.co', | |
userId: 3967 | |
} | |
} | |
updateValues() { | |
this.setState({userName: 'Azat'}) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment