score:3

Accepted answer

Compute your state before component is actually updated.

componentWillUpdate(nextProps, nextState) {
  nextState.value = nextProps.a + nextProps.b;
}

Your component will get computed value with other changes and will update only one time.


Related Query

More Query from same tag