July 2018
Beginner
236 pages
5h 34m
English
MobX also gives you the ability to see the backing atoms at runtime. Going back to our previous example of the computed description property, let's explore its dependency tree:
import { autorun, $mobx, getDependencyTree } from 'mobx';const cart = new ShoppingCart();const disposer = autorun(() => { console.log(cart.description);});const descriptionAtom = cart[$mobx].values.get('description');console.log(getDependencyTree(descriptionAtom));
There are few details that stand out in the preceding snippet:
Read now
Unlock full access