Change Template Data in onCreated: good or bad practice?


#1

I recently started using @sacha’s template level subscriptions and am really liking it. The one thing I don’t like is having to create helpers for the template level variables. It seems it would make things simpler to add the variables to the template’s data context and no helpers would be necessary, like so

// in onCreated
instance.data.limit = new ReactiveVar(5);
// no helpers
// in html
{{limit.get}}
// in events
this.limit.get

But I feel like I’m missing some potential pitfall or caveat. Would this be considered bad practice?