News for hackers. Stuff that matters.
Re:Ask HN: What is your favorite front end state management ... by symlinkk on Sunday December 25, 2022 @09:16PM (#34133828)
I thought the issue with that is that it re-renders if any part of the context changes.
Re:Ask HN: What is your favorite front end state management ... by yawnr on Sunday December 25, 2022 @10:40PM (#34134317)
You’re correct and these people advocating for this are definitely re-rendering every component in their tree with every change
Re:Ask HN: What is your favorite front end state management ... by dmak on Sunday December 25, 2022 @11:53PM (#34134715)
It just means you need more granular contexts right?
Re:Ask HN: What is your favorite front end state management ... by symlinkk on Monday December 26, 2022 @01:25AM (#34135231)
Right, but then you have a ton of contexts littered everywhere. Seems like that would be a lot of clutter.
Re:Ask HN: What is your favorite front end state management ... by gnomewrecker on Monday December 26, 2022 @10:08AM (#34138172)
In my experience most of my state in contexts changes infrequently (auth information, or the “current client” for a dashboard, or whatever), and then local state is sufficient for the rest. The few times I have sufficiently complexity in the “middle” I indeed have been annoyed and had to be careful to avoid over-frequent rerenders.

It’s just rare enough that “prefer contexts” is a good rule. Simpler, easier to understand code, with no Redux nonsense.

Re:Ask HN: What is your favorite front end state management ... by yawnr on Tuesday December 27, 2022 @04:49PM (#34154327)
Redux isn’t nonsense you’re just being dismissive and not taking the time to learn to understand it properly.