Good old React and good old React problems. Especially when it comes to global state management, you will probably think - another article about why w

react-tracked - so helpful tool

submited by
Style Pass
2021-07-25 14:00:07

Good old React and good old React problems. Especially when it comes to global state management, you will probably think - another article about why we should switch to React Context instead of using Redux. Not at all. It won't be a good idea in most cases anyway, but do we need to use Redux everywhere? What are other options? No, no, other than Zustand, Recoil, MobX? ;)

If you don't know why, you will probably need to read some more articles on the net, not only this one because I won't focus much on how React works. Long story short - it has quite a significant performance impact when it comes to components rerenders. Of course, nothing is only black or white. It all depends, sometimes when you don't care much about performance stuff, it is totally fine to use React Context everywhere.

Because React doesn't provide any optimization for it as is, of course, you can use memo for components and decide when they should refresh. Let's be honest. Managing it all in a big project with more than one developer will be... challenging. In more significant projects, it is quite problematic to keep such a codebase in good shape. It is why we have so many state management tools and approaches in React community.

Leave a Comment