mobx-guard

1.0.0 • Public • Published

MobX Guard

Build Status

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

Readme

Keywords

Package Sidebar

Install

npm i mobx-guard

Weekly Downloads

0

Version

1.0.0

License

MIT

Last publish

Collaborators

  • kriegslustig