July 2018
Beginner
236 pages
5h 34m
English
While spy() gives you a lens to observe all changes happening in MobX, trace() is a utility that is specifically focused on computed properties, reactions, and component renders. You can find out why a computed property, reaction, or a component render is being invoked by simply placing a trace() statement inside it:
It has three optional arguments:
It is quite common to invoke a trace with: trace(true), which will pause inside the debugger upon invocation. For the book search example (from Chapter 3, A React App with MobX), we ...
Read now
Unlock full access