1.1.1 • Published 7 years ago
meteor-reactive-object v1.1.1
meteor-reactive-object
Makes an object reactive using es6 proxies
Installation
$ npm install --save meteor-reactive-object
Usage
import { Tracker } from 'meteor/tracker'
import reactiveObject, { isSupported } from 'meteor-reactive-object'
if (!isSupported()) throw new Error('ES6 proxies are not supported by your environment!')
const obj = reactiveObject() // reactiveObject(intitialValue: object = {}, options: object = { recursive: true, compare: (a, b) => a === b })
Tracker.autorun(() => {
console.log(obj.foo)
})
obj.foo = 'bar'
License
Licensed under MIT license. Copyright (c) 2017 Max Nowack
Contributions
Contributions are welcome. Please open issues and/or file Pull Requests.
Maintainers
- Max Nowack (maxnowack)