Chapter 11 - pg. 131, shouldComponentUpdate question?

Perhaps I am not understanding, which could entirely be possible. But I wanted to understand this before I move on. In the simple snippet, " if (newState.count <5) {… "

“…we check whether the new value of our id state property is less than or equal to 2”

Why is the value 2 when in the code its value is 5? Appreciate the help in advance. Just a student trying to learn as much as I can!

Welcome to the forums @estradanicolas :stuck_out_tongue:

You found a mistake! The code should either say < 2 or the text should say “less than or equal to 5”.

Just out of curiosity, are you on the 1st edition or 2nd edition of the book?

Kirupa :grinning:

I am on the second edition. Right now my favorite hands-on guide for React. Thank you for your work!