Are the two Session.set sequences causing a reboot?

In Chrome console

> Tracker.autorun(function() {console.log(Session.get('show'))});

> Session.set('show',2);
2
> Session.set('show',3);
3
> Session.set('show',4);Session.set('show',5);
5

      

Are the two Session.set sequences causing a reboot? How can I run it twice?

+3


source to share


1 answer


You can use Tracker.flush()

to immediately restart the calculation after the first update of the reactive data source:



> Session.set("show",4);Tracker.flush();Session.set("show",5);

      

+1


source







All Articles