Hacker News new | ask | show | jobs
by jshc 2962 days ago
curious about the explicit true and false in one of their code examples. any good reason for that?

// dispatching an action based on state change componentWillUpdate(nextProps, nextState) { if (nextState.open == true && this.state.open == false) { this.props.onWillOpen(); } }

1 comments

Do you mean instead of using !nextState.open and `this.state.open`? Reads a little easier to write out the booleans in my opinion.