Skip to content

Instantly share code, notes, and snippets.

@kartikag01
Created August 30, 2018 09:14
Show Gist options
  • Save kartikag01/29858bbd772bc9647af3d26511111f13 to your computer and use it in GitHub Desktop.
Save kartikag01/29858bbd772bc9647af3d26511111f13 to your computer and use it in GitHub Desktop.
AfterComponentWillUpdate
componentDidUpdate(prevProps, prevState) {
if (prevProps.value !== this.props.value) {
this.props.changeValue(this.props.value); // action
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment