1.1.1 • Published 7 years ago

meteor-reactive-object v1.1.1

Weekly downloads
7
License
MIT
Repository
github
Last release
7 years ago

meteor-reactive-object Build Status

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

1.1.1

7 years ago

1.1.0

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago