Created
October 25, 2020 17:25
-
-
Save misss-popcorn/3a3244d95f3db7beaef2160e6260f0cf 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
componentDidUpdate(prevProps, prevState) { | |
if (this.state.name !== prevState.name) | |
this.setState({textColor: getRandomColor()}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment