Introduction:
Over the years, the massive growth of React.JS has given birth to different state management libraries, amongst other thin...
For further actions, you may consider blocking this person and/or reporting abuse
Recoil is the only one that does the job without boilerplate, if you still use redux I'm very sad for you.
redux have very little boilerplate these days too
Still too much
You probably have not seen Hookstate. It is even better on this aspect.
Thanks for the suggestion I will look into hookstate I think I will like it.
i'm agree with you, hookstate is easy and faster
yeah, but most codebases already have redux, to maintain such codebases, you must have a solid grasp of redux. Don't you think that this makes redux very important till date?
Important in existing ones sure, if you are forced to use it and not allowed to change it you have no choice. But if you have the choice there are alternatives.
No the only one 😛 this one is much simple github.com/aralroca/fragstore and you can consume parts of the store avoiding inecessary rerenders ☺️
what about redux toolkit?
I would not use it personally, recoil + react-query is what I use currently
Can I know the reason?
or just explain why you not using redux toolkit.
They simply hacked rtk together only because they saw that people started using other libraries, I don't like this, also other solutions work better and are cleaner.
understood, make sense for me brother.
Hookstate hookstate.js.org/ should be in the list too. It is the only lib which gives an efficient solution for deep nested state updates. And it probably has the simplest same API for all states: global, local, parent, nested, async, etc..
Why do you feel the need to promote your library everywhere if it is really that good?
Everywhere is a bold statement. I do not have a budget to do it everywhere.
That is exactly the point... if you had the budget, you would be literally everywhere.
No, I would not. I direct money elsewhere. This library is published without having a viable commercial business model in mind. I have got other things for this purpose.
Valtio is the newest kid on the block. From the creator of Zustand and Jotai.
Pros:
Cons:
Would be interesting to hear your opinion on Valtio.
For reference, here is a useful brief overview over the general approaches:
React Query + Zustand 🙂
Any benefits when paired with zustand? Why not use getQuerData instead? I want to hear your thoughts about this pair 😊 -just curious
React Query + Zustand
Recoil is amazing :)
In my opinion Apollo client (GraphQL) is the best
Being experience using Apollo Client for couple of years. I couldn’t agree more. Though is quite a different approach on managing state with using normalizing cache.
Apollo useVar really being helpful for managing client state!
Thanks for sharing sources.
Unfortunately the comments section is not that capable to discuss your article. (No, I would not do a better job commenting too)
Using vanilla state management, no need for more bloat and complexity.
What you imply is that all people using React, Redux, Recoil, or any tool like npm, jQuery, or whatever, they are dumb because they don’t need anything. They could do it by themselves using vanilla JS. They could even do everything inside a single HTML file written in notepad.
We are so dumb!
We have a vanilla solution too. What's your experience been?
This article could've consisted only of one word - Mobx.
Try eventrix. It’s a new open source alternative for redux. It’s faster than redux and it has a built-in event bus. Test it and let me know what you think.
Try dourajs.github.io/doura
should I use React Hooks or State Management Library or I should create my JavaScript code which holds the global state?
This is simply... Just use "Easy Peasy" library, this is zero boilerplate, easy and powerful 🥰
What about
reactn
??!!This is so helpful post for me. I appreciate you. Can I translate this into Korean and repost on my blog? I think this is helpful to any other Korean developers.
Sure, please feel free to do it!
What about loading data from the server, the main point of state, and ridiculous redux doesn't handle it without thunks or yet more plugins. How is recoil?
Redux is unopinionated library, thats why it doesnt include server data handling.
Actually last alpha of redux-toolkit contains RTK Query - tool for data fetching and caching.
github.com/rtk-incubator/rtk-query
what is recommended for classic apps with one save button/reset button for multiple tabs and many textfields/tables?