Events in the Lightning Component Framework

The Lightning Component framework is based on the event-driven model. For two components to talk to each other, the framework recommends using Lightning events. In an event-driven modal, one component acts as a publisher (publisher components register and fire events), and one or more components can subscribe to published events and take action. In the Lightning Component framework, there are two primary types of events: application events and component events. Events are created in a separate file, with an extension of .evt. Events in Lightning can also consist of attributes, which allow events to carry data from one component to another.

In this chapter, we will cover the following topics:

Get Learning Salesforce Lightning Application Development now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.