score:0

getSnapshotBeforeUpdate(prevProps, prevState) {
  if (this.state.name !== prevState.name) {
    this.props.cacheState(prevState.someState) 
  }
}

Related Query

More Query from same tag