Ember parent child component, how to avoid unnecessary life cycle hook from triggering?

294 Views Asked by At

Child component property update is triggering all the parent component willUpdate,willRender,didUpdate and didRender life cycle hook methods. but I just updated property which is visible only the child component, It has nothing to do with parent component.

Twiddle to check.
Twiddle to check with powerselect - when mouse over dropdown option it's triggering the all of its parent component willUpdate,willRender,didUpdate and didRender life cycle hook methods.

Is there any way I can avoid this behavior?. [I tried with/without this._super(...arguments)]

PS: The reason is, I am doing some heavy operation in didRender hook of the parent component I don't want to run this unnecessarily. (One solution I can think of is manually checking for the specific property alone is changed or not by myself and run the heavy operation upon the condition).

0

There are 0 best solutions below