1.0.1 • Published 5 years ago
mobx-run-in-reactive-context v1.0.1
mobx-run-in-reactive-context
Use this whenever you get this warning: Computed value is being read outside a reactive context. Doing a full recompute.
import runInReactiveContext from 'mobx-run-in-reactive-context'
// ...
runInReactiveContext(() => {
// Read your computed value here
console.log(object.computedValue)
})