Skip to content

Latest commit

 

History

History
16 lines (11 loc) · 496 Bytes

README.md

File metadata and controls

16 lines (11 loc) · 496 Bytes

mobx-run-in-reactive-context

npm version

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)
})