dispatch:pause-var

v1.0.0Published 10 years ago

This package has not had recent updates. Please investigate it's current state before committing to using it in your project.

PauseVar

A reactive var that allows you to pause reactivity.

##Usage

meteor add pause-var

var pauseVar = new PauseVar();

pauseVar.pause();

Tracker.autorun(function () {
  console.log(pauseVar.get());
});

// dependency.changed() will not called until resume
// but storedVar.get() will have the latest value
pauseVar.set('New value');

Meteor.setTimeout(function () {
  pauseVar.resume();
}, 5000);