mobx-run-in-reactive-context
v1.0.1
Published
Solution for the "value is being read outside a reactive context" warning
Downloads
4
Readme
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)
})