function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
ugsfdcugsfdc 

What is the order of execution in lightning component ?

Hi All,
We have order of execution in apex like this may i know the order of execution in lightning and which one is executed first like component, js cotroller,helper,server controller....

Regards,
Ugsfdc
Naveen KNNaveen KN
order of execution in the lightning component

1. on click of a button in the user interface control goes to the client-side controller js file
2. from controller js, if there are any calls to helper js file, it will execute 
3. from helper it will call the service side apex class which are annotated with @AuraEnabled
4. In return, apex sends the response back to the client-side helper js file in this case
5. in the helper the logic is executed to set the user interface changes is executed 

Trailblazers can add more in case if I missed something

--
Naveen K N