meteor-reactive-object

1.1.1 • Public • Published

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

Readme

Keywords

none

Package Sidebar

Install

npm i meteor-reactive-object

Weekly Downloads

3

Version

1.1.1

License

MIT

Last publish

Collaborators

  • maxnowack