3 ms·
Zustand has solved the complexity of state management for me, although getting {employer} to adopt it is of course a different problem altogether. It's really
by cehrlich 5y ago
Zustand has solved the complexity of state management for me, although getting {employer} to adopt it is of course a different problem altogether.
It's really bizarre to me how poorly useContext works, in contrast to how good everything else in React is for the most part. Having a good, "official" global state management solution that requires little boilerplate would be a huge benefit.
- mst 5y agoI am currently most fond of mobx / mobx-state-tree which is a substantially different style but I am very much impressed by zustand as "take the redux style and do it really well". There are enough different takes on how to state management that I am ... ambivalent ... about whether having a single official solution would in practice be better than the current situation. It's inevitably going to be a trade off and the react team not wanting to pull the trigger on such a thing until they're -really- sure is probably a good thing overall. As a side note: I agree that useContext is weird, but jamming what (at least according to the mental model I use when working with it) is dynamic scoping into a language without native dynamic scope is probably always going to be at least somewhat weird.
- ConsoleTVs 5y agoWait till you realize Zustand does not work on React 18's Concurrent Mode and istead must use Jotai (same author) ?
- cehrlich 5y agoZustand 4 already works with Concurrent Mode. Still in beta, but so is React 18.