Okay, so I’ve created examples of both a non-working and a working version of my issue…
This is obviously a slightly contrived example, my real use-case is somewhat more complex, but, it highlights my point well enough.
Essentially, what I expect to happen is the button press causes the score to go up by 5 points… The helper that adds the “***” is merely an example of a function that transforms the result in some way.
If the data being passed through from the parent template is reactive, then I would expect the autorun (in the broken example) to fire when it changes, but it doesn’t.
If the value isn’t reactive, I wouldn’t expect it to fire the helper in the second (working) example, but it does!
Can someone please explain what the hell is going on!?
EDIT: Someone has stated that it’s because Template.instance() is reactive and the template context isn’t… If that’s the case why doesn’t replacing the line:
var score = self.data.score; with
var score = Template.instance().data.score; cause the first example to start working?