When using meteor with ecmascript's arrow notation, using 'this' to access the value described in the documentation always fails. For example:
Template.temp.onCreated(()=> {
this.var = new ReactiveVar("")
})
and then access it via:
Template.instance().var
always fail. This is consistant in almost any use of 'this' in meteor, client or server side. When inspecting from the client, I can see that "this" is compiled into "_this" which always cause the code to fail.
the code is compiled into:
_this = this
Template.temp.onCreated(function() {
_this.var = new ReactiveVar("")
})
Any advice is appreciated.