3 ms·
IMO, context does a lot to remove the value of MobX from React applications. Not necessarily Redux; Redux gives you some additional stuff, particularly around s
by eropple 8y ago
IMO, context does a lot to remove the value of MobX from React applications. Not necessarily Redux; Redux gives you some additional stuff, particularly around state tracking and rewinding. But I haven't seen a MobX project where a judiciously used context doesn't solve the same problem within the React-specific ecosystem.
- deleted 8y ago[deleted]
- hombre_fatal 8y agoThe value of mobx is that you implicitly link each component to its data dependencies by dereferencing arbitrary paths into your storage objects in the render() function so that the component rerenders only when data at those paths change. Does the Context achieve this as well? From a quick search, the Context seems to force rerender of any consumer on any change.
- revskill 8y agoYou can use library like reselect to optimize. The job of context is simple: implicitly passing down value to deep component.