# Chapter 11 - pg. 131, shouldComponentUpdate question?

**URL:** <https://forum.kirupa.com/t/chapter-11-pg-131-shouldcomponentupdate-question/642662>\
**Category:** Uncategorized\
**Created:** [May 2, 2020, 4:13pm UTC](https://forum.kirupa.com/t/chapter-11-pg-131-shouldcomponentupdate-question/642662 "2020-05-02T16:13:32Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![estradanicolas](https://avatars.discourse-cdn.com/v4/letter/e/9fc29f/32.png) [@estradanicolas](https://forum.kirupa.com/u/estradanicolas)\
**Post date:** [May 2, 2020, 4:13pm UTC](https://forum.kirupa.com/t/chapter-11-pg-131-shouldcomponentupdate-question/642662/1 "2020-05-02T16:13:32Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![kirupa](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/kirupa/32/11616_2.png) [@kirupa](https://forum.kirupa.com/u/kirupa)\
**Post date:** [May 2, 2020, 6:39pm UTC](https://forum.kirupa.com/t/chapter-11-pg-131-shouldcomponentupdate-question/642662/2 "2020-05-02T18:39:51Z")

</div>

Welcome to the forums @estradanicolas 😛

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?

Thanks,  
Kirupa 😀

---

<div class="post-metadata">

**Author:** ![estradanicolas](https://avatars.discourse-cdn.com/v4/letter/e/9fc29f/32.png) [@estradanicolas](https://forum.kirupa.com/u/estradanicolas)\
**Post date:** [May 3, 2020, 2:37pm UTC](https://forum.kirupa.com/t/chapter-11-pg-131-shouldcomponentupdate-question/642662/3 "2020-05-03T14:37:36Z")

</div>

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