News for hackers. Stuff that matters.
Re:Reasons to Learn Redux as a JavaScript Developer by _bxg1 on Wednesday January 01, 2020 @12:51PM (#21929291)
> 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.

There are no comments on this comment yet.