Activity Forums Salesforce® Discussions What is the difference between action and event in the salesforce lightning component ?

  • Piyush

    Member
    August 28, 2019 at 6:34 am

    Hi Nikita,

    1. Actions:-User interaction with an element on a component or app. User actions trigger events, but events aren’t always explicitly triggered by user actions. This type of action is not the same as a client-side JavaScript controller, which is sometimes known as a controller action. The following button is wired up to a browser onclick event in response to a button click.
    2. Events:-A notification by the browser regarding an action. Browser events are handled by client-side JavaScript controllers, as shown in the previous example. A browser event is not the same as a framework component event or application event, which you can create and fire in a JavaScript controller to communicate data between components. For example, you can wire up the click event of a checkbox to a client-side controller, which fires a component event to communicate relevant data to a parent component.

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos