Is that still planned? I like having lots of reactive state rather than doing $(…).something() and I want those things scoped as locally as possible rather than in the session.
For sure that works (though ReactiveDict is better because it can be preserved across hot code pushes), but the problem is that you need to write a bunch of boilerplate to make that work. You need to set up the var and create a helper.
I think it’s not going to be shipped soon, but it’s something that should be able to be implemented in a package via monkey-patching.
You could override the template constructor to automatically add an
onCreated hook to create
this.state, and create a global helper for
Basically, like you said, it’s already possible, and you could create a package to remove boilerplate.
Thanks, I’ll probably do that!