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

backport navigation guard return values #3796

Open
1593292349 opened this issue Oct 30, 2022 · 1 comment
Open

backport navigation guard return values #3796

1593292349 opened this issue Oct 30, 2022 · 1 comment
Labels
feature request fixed on 4.x This issue has been already fixed on the v4 but exists in v3

Comments

@1593292349
Copy link

1593292349 commented Oct 30, 2022

What problem does this feature solve?

being able to return a value in a navigaiton guard:

router.beforeEach(to => {
  if (!user)
  return { name: 'login', query: { redirectTo: to.fullPath } }
})

### What does the proposed API look like?
Like v4. X

<!-- generated by vue-issues. DO NOT REMOVE -->
@posva
Copy link
Member

posva commented Nov 11, 2022

Some features cannot be backported without rewriting big parts of the router. I tried porting back as much as I could in the limited time I have.

If anybody wants to backport the navigation guard return value, that would be nice

@posva posva changed the title Whether v4.x related features can be ported backport navigation guard return values Nov 11, 2022
@posva posva added the fixed on 4.x This issue has been already fixed on the v4 but exists in v3 label Nov 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request fixed on 4.x This issue has been already fixed on the v4 but exists in v3
Projects
None yet
Development

No branches or pull requests

2 participants