Tracker.nonreactive for Session.set


#1

Hi all

I wonder if anybody can suggest a way how to set Session variable without triggering reactivity. Looks like Tracker.nonreactive() is meant only for Session.get() not Session.set(). Or so it seems, as it is not working - console.trace() in computation.onInvalidate() shows that Session.set() within Tracker.nonreactive() caused invalidation.

Maybe it is a bit odd setup I have, but basically when loading saved state, it gets applied to various control elements, and that in turns triggers the same actions as if controls would be changed, thus generating new save. It is a messy code for sure, and Tracker.nonreactive would be workaround anyway. But it is interesting why it does not work. In the tracker manual (https://github.com/meteor/meteor/wiki/Tracker-Manual) there is nothing about this scenario.