Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

An ability to set action callback without Aura context wrapper - $A.getCallback() #7

Open
ruslan-kurchenko opened this issue Jan 3, 2018 · 0 comments
Labels

Comments

@ruslan-kurchenko
Copy link
Owner

ruslan-kurchenko commented Jan 3, 2018

By default, then(), catch() and finally() function wraps callback function with $A.getCallback().
Lax should provide an ability to avoid that.
There are can be situations where it is redundant, for example when callback doesn't change any component attribute and doesn't manipulate DOM.

An example of usage:

    component.lax.enqueue('c.actionName')
      .then(() => {
        // custom logic
      }, false)

API:

  • then(callback, isAuraContext)
  • catch(callback, isAuraContext)
  • finally(callback, isAuraContext)

isAuraContext - is true by default

@ruslan-kurchenko ruslan-kurchenko changed the title Ability to set action callback without Aura context wrapper - $A.getCallback() An ability to set action callback without Aura context wrapper - $A.getCallback() Jan 5, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant