When i first learned about State, it is so friendly and simply just “data that is going to change + mutating it triggers a component rendering”. That’s what people told me.

After years working with it, i started perceiving the gap in my knowledge. The State I used to know, comes with more concepts & related concerns that i only realized after hitting hardship & lots of researching effort. Hardly had i found a post covering them all. So in this blog post, let’s break it down !

  • The problem: What problem State solves?
  • You probably don’t need State?: Decide when to use State wisely.
  • The big rendering picture: How State relates to the rendering process, how it is a part of the rendering picture.
  • Why Asynchronous? Reasons behind API design: Batching, Internal Consistent, Concurrent Updates?
  • Side Effect: Properly handle side effect.
  • Placing your State effectively: How placing state boosts your performance.

#react #javascript

The Most Complete Guide to React State You’ll Ever Read
1.15 GEEK