Activity Forums Salesforce® Discussions What are the basic differences between Application Event and Component Event in Salesforce?

  • shariq

    Member
    September 23, 2018 at 10:42 pm

    Component events are used to do communication between child and parent. They use bubbling and capture same as used in DOM events. A change in a child component can be communicated to the parent component via component event.

    Application events are used to communicate any change in the component to a broader audience. Any component who has registered for this event will get a notified.
    To use Component Event API we use the below syntax

  • Parul

    Member
    September 24, 2018 at 1:28 am

    Component events are used to do communication between child and parent.

    Application events are used to communicate any change in the component to a broader audience.

    Adding some more points:

    Application Events vs Component Events : Which/How to use for handling custom events in Lightning. Lightning framework is based on event-driven architecture which allows to communicate between different events. Lightning events can be fired or handled by javascript controller.

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos