Can you just do `if (this.state.code !== nextState.code)`?