I don't have much experience with Angular (except AngularJS - shudder), but before this React project I used Vue for a few years with Vuex and never ran into such issues. Sure it required more wiring, but it was reliable and did exactly as state management should; give you the current state without any side effects.
I'd say selective rendering with contexts is painful bc a context will always rerender all of its consumers if the reference of the value passed to Provider changes (=== comparison).
So, for instance, passing an object built on every render will certainly trigger a mass re-render.
To fix this one has to break the data into multiple context providers.
If you inspect a redux application (with react dev tools) you may notice DOZENS of context consumers generated by the library wrapping an element.
I'd say selective rendering with contexts is painful bc a context will always rerender all of its consumers if the reference of the value passed to Provider changes (=== comparison).
Exactly right. It's the side effects of something updating in a context and that waterfall effect that makes them so painful.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
I don't have much experience with Angular (except AngularJS - shudder), but before this React project I used Vue for a few years with Vuex and never ran into such issues. Sure it required more wiring, but it was reliable and did exactly as state management should; give you the current state without any side effects.
I'd say selective rendering with contexts is painful bc a context will always rerender all of its consumers if the reference of the value passed to Provider changes (=== comparison).
So, for instance, passing an object built on every render will certainly trigger a mass re-render.
To fix this one has to break the data into multiple context providers.
If you inspect a redux application (with react dev tools) you may notice DOZENS of context consumers generated by the library wrapping an element.
Exactly right. It's the side effects of something updating in a context and that waterfall effect that makes them so painful.