11 ms·
> Inexperienced devs will put everything in the global state and end up with a soup. And Redux is just one big global state > it is _magic_ - I would have tro
by _bxg1 7y ago
> Inexperienced devs will put everything in the global state and end up with a soup.
And Redux is just one big global state
> it is _magic_ - I would have trouble rewriting it from the docs, would you be able to do it?
I accidentally wrote a (bad) version of MobX's core mechanism before I learned about it. At its heart it just uses object Proxies to intercept getters and setters; the former to find out where something is used, the latter to find out when it changes.
It can feel a bit magical sometimes, but the magic isn't hard to understand, almost always just works, and when it doesn't do what you want it usually causes a performance impact, not breakage.
> Note that it also changes the way React render method works.
I don't know what you mean. Aside from "tracking" which observables get accessed within it, all it does is decide when to trigger updates.