Posts

Showing posts from June, 2021

Understanding Events in Aura

Aura events in Salesforce Lightning are crucial for enabling communication between components. There are two primary types of events in Aura: Application Events and Component Events . Both types follow propagation patterns similar to DOM event handling, such as capture and bubble phases. Here’s a breakdown of how these events function and propagate within the Aura framework. 1. Application Events Application events follow a publish-subscribe model, meaning that once an event is fired, any component that has registered a handler for that event will be notified. The propagation of application events follows three phases: capture , bubble , and default . Phases of Application Event Propagation: Event Fired : An application event is fired by a component. This component is known as the source component . Capture Phase : The framework begins executing the capture phase, starting from the application root and moving down to the source component. Each component along this path has the cha...