mobx-suspend
mobx utilities to suspend/unsuspend reactions
mobx-suspend
contains functions you can use instead of the standard mobx reaction and computed features that
allows them to be suspended dynamically.
Installation
$ npm install mobx-suspend --save
or if using yarn
$ yarn add mobx-suspend
Basic Usage
Suspendable computed
; ; const myComputed = ; @observable value = "initial"; @myComputed { return `-with-addition` } const instance = ; myComputed; instancevalue = "first change"; // console.log is not called instancevalue = "second change"; //console.log is not called myComputed;
Suspendable reaction
; ; const value = observable; const reaction = reaction; value; //the console.log action is not called reaction //the console.log action is called with "new value"
License
MIT