4 ms·
React isn't a state manager and why should everyone be forced to use the one "blessed" manager? Despite there being so many, only a handful (redux toolkit, jot
by hajile 3y ago
React isn't a state manager and why should everyone be forced to use the one "blessed" manager?
Despite there being so many, only a handful (redux toolkit, jotai, zustand recoil, and mobx) see much real-world use and they are basically just 3 approaches (reducers, signals, and directed graphs) with varying levels of complexity and features.
> Yes, after it has DIFFED the whole tree to see where the changes occurred in the first place. Madness. Layers of utter madness.
Not true. It only needs to diff the leaves of the part that changed and some of those sub-trees can be skipped too if they are functionally pure (or uses shouldComponentUpdate). This is how they reduce complexity down from O(n^3) to something generally closer to O(n)
- Exuma 3y agoI use vue, so I’m assuming that is the “signals approach”. I use pinia btw Can you explain how all 3 state mechanisms you mentioned, and how they are different ?