← React Beginner Questions - Set 9 Q86

What is the purpose of the shouldComponentUpdate lifecycle method?

React Beginner Questions - Set 9

Example

shouldComponentUpdate(nextProps, nextState) {
  return nextProps.value !== this.props.value;   // false = skip render
}

What to notice

← Back to the question list