Here is my current setup:
Template.myTemplate.helpers({
reactiveVar: new ReactiveVar
});
How can I initialize reactiveVar
within the onCreated function?
Template.restaurantEdit.onCreated(function() {
// I want to initialize helpers.reactiveVar here
// The objective is to populate reactiveVar with data, for example:
helpers.reactiveVar = this.data.someData;
});
I came across __helpers but it is protected: this.view.template.__helpers
Is there a more elegant way in Meteor to access helpers? Or what is the preferred method in Meteor to set up reactiveVar with loaded data
?