|
Answer» There are four types of Salesforce Lightning Events. They are as follows: - System Events: The lightning framework fires system events when a component is initialised, rendered, or an attribute value is changed, AMONG other things. The following are the various sorts of Lightning-supported system events:
- aura:valueInit: When the component markup is started or loaded but the component page is not yet rendered, this event runs a logic. This is the first TIME a system event is triggered.
- aura:valueRender: When the component page is fully drawn or re-rendered, it runs a logic.
- aura:noAccess: When the requested resource has no ACCESS authorization, this event runs a logic.
- aura:locationChange: When the URL hash part of the URL has been updated, this event runs a logic.
- aura:systemError: When an error occurs during the execution of a server-side (apex controller) activity, this event runs a logic.
- aura:valueChange: When the value of an aura property is updated, this event runs a logic.
- aura:valueDestroy: Runs a logic when a component is destroyed and we want to do some custom cleanup at the same time.
- Lightning Application Events from Library: These events are offered by Salesforce Library and can be utilised frequently depending on your needs. However, some of these library events may not be supported simultaneously in a Salesforce app, Lightning Experience, or standalone app. As a result, it's best to use $A.get() to figure out where your component is running, whether it's a Salesforce app with Lightning Experience or a standalone app.
- Application Events: Application Events assist in the exchange of values between two separate events (WITHOUT a parent-child relationship). It WORKS in the same way as a broadcast message, in that any device with the receiver turned on can receive the broadcast message transmitted by a single device. It means that any component having an event handler statement can receive the fired event in the case of Application Events.
- Component Events: To send values from a child component to its parent, component events are required. The event fired by the child components (sender) will be handled by the parent component (receiver).
|