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

#21

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

#22

@sashko )))
I just use it for Template.state as a ‘constant state’ for layout templates during navigation/routing

#23

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

#24

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

#25

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?

#26

In my case it was form submission yeah.

#27

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