Activity Forums Salesforce® Discussions what is the use of $A.getCallback() in Salesforce lightning component ?

  • Deepak

    Member
    August 28, 2019 at 12:00 pm

    Use $A.getCallback() to wrap any code that modifies a component outside the normal rerendering lifecycle, such as in a setTimeout() call. The $A.getCallback() call ensures that the framework rerenders the modified component and processes any enqueued actions.

  • Saddam

    Member
    August 29, 2019 at 6:15 am

    Hi Nikita,

    $A.getCallback(), it returns a function that closures the current access context. You then need to execute that function.

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos