Meteor - Understanding the "rendered" calls of the model

advertisements

I'm a bit of a newb in Meteor so this is possibly a trivial question for you Meteor masters out there.

I use a template which has a couple of child templates:

<template name="parent">
{{> child1}}
{{> child2}}
</template>

I noticed that parent.rendered and child1.rendered functions are invoked when reactive data under child2 changes. My understanding of meteor docs is that only child2.rendered should be called. So, what I am seeing should not happen, yet for a reason which is beyond me, it does.

To rule out any noise, I gutted the child1 template (to contain only an empty div). Still, its rendered function is called.

Can anyone provide insight?


As of Meteor 0.7.0.1, the parent template will be re-rendered but the sibling child templates will not.

Here is a simple example Meteor app that shows this in action: https://github.com/alanning/meteor-subtemplate-isolate-test

Keep in mind that Meteor UI is getting a drastic overhaul before Meteor 1.0 lands so a lot of things may change with respect to how templating works.