Skip to content

Instantly share code, notes, and snippets.

@kartikag01
Created August 30, 2018 09:13
Show Gist options
  • Save kartikag01/42cd412455b03427707856e1a2a36043 to your computer and use it in GitHub Desktop.
Save kartikag01/42cd412455b03427707856e1a2a36043 to your computer and use it in GitHub Desktop.
BeforeComponentWillUpdate
componentWillUpdate(nextProps, nextState) {
if (this.props.value !== nextProps.value) {
this.props.changeValue(nextProps.value); // action
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment