function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Niraj Singh 28Niraj Singh 28 

parent to child component communication

Hi, I know using "COMPONENT" event child component communicate with parent componet. but is this possible vice versa?
Can parent component communicate with child component using "COMPONENT" event or not?
Meghna Vijay 7Meghna Vijay 7
Hi Niraj,

There is no need to do that you can follow two ways to communicate parent component with child component :-

1) Aura Method https://developer.salesforce.com/docs/atlas.en-us.lightning.meta/lightning/ref_tag_method.htm
2) Bound Expression https://developer.salesforce.com/docs/atlas.en-us.lightning.meta/lightning/expr_data_binding.htm
Hope it helps, if it does mark it as solved.

Thanks
Naveen KNNaveen KN
Yes, a parent can talk to the child in the containment hierarchy, we can make us of the capture phase of the component events. 

Capture
The event is captured and trickles down from the application root to the source component. The event can be handled by a component in the containment hierarchy that receives the captured event.
Event handlers are invoked in order from the application root down to the source component that fired the event.
Any registered handler in this phase can stop the event from propagating, at which point no more handlers are called in this phase or the bubble phase.

That is applicable for multiple components in the hierarchy. In case if you have two component with parent and child, and you want to communicate from parent to child, then make use of aura methods. 
--
Naveen
Ravi Dutt SharmaRavi Dutt Sharma
Parent to child component communicationis not possible using component events. Possible options are 1) Application events (should be kept as the last option as it impacts performance) 2) Aura methods (define aura method in child component and call it from parent component) 3) Bound expressions {!v.attributeName}