In Meteor, how can I stop reactivity on an ONE variable?
I want all other variables to be reactive, with the exception of one variable. Is it possible?
You can achieve this with Tracker.nonreactive.
Tracker.nonreactive
Unverified example:
// Get a session value in a non reactive way. var myValue = Tracker.nonreactive(function(){ return Session.get('theKey') }) // Use myValue however you please.
just create a non-reactive varaible with "var name = 'John';"
While this Tracker.nonreactive()is a general approach (any reactive source can wrap), for ReactiveVaryou can use a simpler solution:
Tracker.nonreactive()
ReactiveVar
someReactiveVar.curValue
This is what it get()also uses behind the scenes .
get()