Handling asynchronous server callback response using Aura:method in lightning component

Aura:method asynchronous call handler
Aura:method asynchronous call handler

Suppose if you’re doing server callback but aura:method will be returned before asynchronous server callback gets completed

for example your UI won’t rendered properly if it depends on asynchronous call back result in aura:method because Aura:method is a synchronous process in lightning component,

For resolving this kind of issues we need to declare an attribute of type function within aura:method definition and you can use this function attribute as parameter in parent component controller where we will be calling child component controller using aura:method to handle asynchronous callback result.

Be the first to comment

Leave a Reply

Your email address will not be published.