MobX-Docs-CN icon indicating copy to clipboard operation
MobX-Docs-CN copied to clipboard

Add missing text and code

Open qinyuhang opened this issue 7 years ago • 0 comments

https://mobx.js.org/refguide/autorun.html Missing text: The return value from autorun is a disposer function, which can be used to dispose of the autorun when you no longer need it. Missing code:

const disposer = autorun( reaction => { /* do some stuff */ } );
disposer();

// or

autorun( reaction => {
  /* do some stuff */
  reaction.dispose();
} );

qinyuhang avatar Mar 02 '19 03:03 qinyuhang