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

Can triggers run asynchronously? #736

Open
yanickrochon opened this issue Jun 17, 2018 · 0 comments
Open

Can triggers run asynchronously? #736

yanickrochon opened this issue Jun 17, 2018 · 0 comments

Comments

@yanickrochon
Copy link

Is it possible to run triggers asynchronously?

For exampls :

FlowRouter.route('/home', {
  // calls just before the action
  triggersEnter: [checkPermissions],
  action: function() {
    // do something you like
  }
});

function checkPermissions(context, redirect, stop) {
  return http.get('/path/to/service', params).catch(e => {
    stop();
  });
}

Where the action does not get executed unto the Promise is resolved?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant