SyntaxFix
Write A Post
Hire A Developer
Questions
setState takes new state and optional callback function which is called after the state has been updated.
setState
this.setState( {newState: 'whatever'}, () => {/*do something after the state has been updated*/} )