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
Ragul MRagul M 

How to make multiple callout as asynchronous from single component?

User-added image
I have one single component which will make two different callouts and append data to two sections.

I want these two-component to load asynchronously so that whichever data comes the first will load first.

But it is now working as expected when I checked network tab in chrome console callouts is concatenated to each other.
 
doInit : {
  helper.callout1();//event based callout
  helper.callout2();//event based callout
}

 
VinayVinay (Salesforce Developers) 
Hi Ragul,

Lightning framework automatically bundles multiple Apex calls and runs each method in the bundle sequentially.

Kindly vote for below idea link.

https://trailblazer.salesforce.com/ideaView?id=0873A000000CZogQAG

Check the workaround mentioned below
https://salesforce.stackexchange.com/questions/293025/boxcaring-is-removed-from-lwc-components
https://salesforce.stackexchange.com/questions/263382/how-to-turn-boxcarring-off-for-lwc-imperative-apex-method-calls

Hope above information was helpful.

Please mark as Best Answer so that it can help others in the future.

Thanks,
Vinay Kumar