Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

react prevstate

handleClick() {
  this.setState(prevState => ({
    isToggleOn: !prevState.isToggleOn
  }));
}
Source by forum.freecodecamp.org #
 
PREVIOUS NEXT
Tagged: #react #prevstate
ADD COMMENT
Topic
Name
3+6 =