3 ms·
problem-space just disappear = magic
by platz 6y ago
problem-space just disappear = magic
- brundolf 6y agoIt has two key aspects that are very magical: the use of Proxy, and the way "tracked functions" work. But both of these, if you take the time to learn, are not very hard to understand. And once you do, everything else very straightforwardly and non-magically falls out from that. These two bits of magic also don't have many caveats/leaks, so in practice you usually don't have to think about the way they're implemented and can just work with the abstraction. Compare this with frameworks like Aurelia that bring in piles of new, implicit, inscrutable abstractions in order to accomplish roughly the same thing. Sprawling magic, that you find yourself constantly tripping over left and right.
- cloverich 6y agoI'd counter: the right level of abstraction. If you have complex views that rely on a variety of properties, and you want performant updates, mutable change tracking automates the process of making it work at precisely the right level. The problem space that goes away is, in redux terminology, the need to make custom selectors as a performance optimization. Instead, you access the properties you need in your render functions, using vanilla js syntax, and mobx tracks it for you.