mirror of
https://github.com/meteor/meteor.git
synced 2026-05-02 03:01:46 -04:00
@@ -5,12 +5,14 @@ datatype for use with
|
||||
[tracker](https://atmospherejs.com/meteor/tracker). It provides all of
|
||||
the functionality of the `Session` object documented in the [main
|
||||
Meteor docs](https://docs.meteor.com/#session), such as reactive
|
||||
`get`, `set`, and `equals` functions, except that its contents are not
|
||||
saved across Hot Code Push client code updates.
|
||||
`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;
|
||||
> var dict = new ReactiveDict('myDict');
|
||||
> dict.set("weather", "cloudy");
|
||||
> Tracker.autorun(function () { console.log("now " + dict.get("weather")); });
|
||||
now cloudy
|
||||
|
||||
Reference in New Issue
Block a user