mobx-guard
1.0.0 • Public • Published MobX Guard
Disallow untracked observations in MobX.
import { guard, untracked } from 'mobx-guard'
const something = mobx.observable({ x: true })
expect(() => {
something.x
}).toThrow()
expect(() => {
autorun(() => {
something.x
})
}).not.toThrow()
Package Sidebar
Install
Weekly Downloads