3 ms·
The number 1 problem React was created to solve is synchronizing state with UI (FB chat originally). Web Components don't provide any solution to this problem.
by sesm 2y ago
The number 1 problem React was created to solve is synchronizing state with UI (FB chat originally). Web Components don't provide any solution to this problem.
- Waterluvian 2y agoAny time I try not to use React and just go vanilla, the main frustration is how much time I waste being imperative with UI state and event listeners and such. I don’t fricking want to manually manage all the pieces! That’s the least interesting part of developing software.
- gedy 2y agoYeah that's the challenge with front end opinions - there's still a lot of folks who want to write code that way (even when using frameworks), then bitch about "too much magic!", etc. I'm with you that I do not want to deal with all that, give me a mental model of state->UI and I'm good.
- hn_throwaway_99 2y agoI agree, but I would also say that it took a loooooong time IMO for react to get good global state management. IMO Redux was generally a disaster - a big overcomplication with lots of unnecessary conceptual pieces - actions/reducers/selectors etc., and I've yet to see a Redux front end that didn't turn into an incomprehensible mess. All I really wanted was just `useState()` but for a piece of state that can be shared between components. I think that exists now in easy-to-use libraries like jotai and zustand, but it certainly took a while to get there. In retrospect I don't think this is that uncommon (overcomplicating something at first and then just simplifying it to the few core things people want) - graybeards like me may remember some of the original EJB horrors.