@blastjs/reactive-dict

1.0.12 • Public • Published

reactive-dict

Source code of released version | Source code of development version


This package provide ReactiveDict, a general-purpose reactive datatype for use with tracker. It provides all of the functionality of the Session object documented in the main Meteor docs, such as reactive get, set, and equals functions.

If you provide a name to its constructor, its contents will be saved across Hot Code Push client code updates.

Example usage:

var dict = new ReactiveDict('myDict');
dict.set("weather", "cloudy");
Tracker.autorun(function () { console.log("now " + dict.get("weather")); });
// now cloudy
dict.set("weather", "sunny");
// now sunny

For more information, see the Tracker project page.

Future work

Unify with reactive-var.

Readme

Keywords

none

Package Sidebar

Install

npm i @blastjs/reactive-dict

Weekly Downloads

1

Version

1.0.12

License

GPLV3

Unpacked Size

29.5 kB

Total Files

6

Last publish

Collaborators

  • harryadel
  • twinklejs