prev props

Solutions on MaxInterview for prev props by the best coders in the world

showing results for - "prev props"
Maina
30 Feb 2019
1componentDidUpdate(prevProps) {
2  // Utilisation classique (pensez bien à comparer les props) :
3  if (this.props.userID !== prevProps.userID) {
4    this.fetchData(this.props.userID);
5  }
6}