News for hackers. Stuff that matters.
Re:Solid.js feels like what I always wanted React to be by cehrlich on Tuesday March 01, 2022 @04:42AM (#30511901)
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.

Re:Solid.js feels like what I always wanted React to be by mst on Tuesday March 01, 2022 @01:21PM (#30517827)
I 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.

Re:Solid.js feels like what I always wanted React to be by ConsoleTVs on Tuesday March 01, 2022 @02:14PM (#30518653)
Wait till you realize Zustand does not work on React 18's Concurrent Mode and istead must use Jotai (same author) ?
Re:Solid.js feels like what I always wanted React to be by cehrlich on Tuesday March 01, 2022 @04:34PM (#30520331)
Zustand 4 already works with Concurrent Mode. Still in beta, but so is React 18.