Track template state the template.instance scoped reactive way instead of using Session vars

You could add a unique ID to the name, if you want it to migrate and also be unique across template instances.

@sashko )))
I just use it for Template.state as a ā€˜constant stateā€™ for layout templates during navigation/routing

At least I suppose that Blaze needs some improvements and Iā€™m looking forward for Blaze II cause I found a lot of helpfull features on a Blaze2 hack-pad

@maxhodges Is there a good way/example of passing data back to the parent template from the nested template?

when would that be necessary? A template reacts to data, it donā€™t really generate or transform data, so I believe the data flow shouldnā€™t need to go back upstream like that. Ah, I guess an exception would be form submission?

In my case it was form submission yeah.

in that case, can you save the submitted data to the db, and set the parent to subscribe to it, so that it will update reactively on submit?

1 Like