Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

react props have changed method

componentDidUpdate(prevProps) {
2  if (prevProps.text !== this.props.text) {
3    this.updateAndNotify();
4  }
5}
Source by www.pluralsight.com #
 
PREVIOUS NEXT
Tagged: #react #props #changed #method
ADD COMMENT
Topic
Name
9+9 =