Although there is a lean outer-level API for MobX, there is also a set of APIs for more fine-grained observation and mutation. We saw how the Object API can be used to make very surgical changes in your observable tree. With observe()
and intercept()
, you can track the changes happening in an observable and also intercept to modify the change.
spy()
and trace()
are your friends during debugging, and coupled with mobx-react-devtools, you have a visual debugger for identifying and improving render performance. These tools and utilities give you a rich Developer eXperience (DX) when working with MobX.
In Chapter 8, Exploring mobx-utils and mobx-state-tree, we will raise the bar on using MobX with the special packages mobx-utils
and mobx-state-tree
.