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

Provide a mechanism for handling duplicate navigation #302

Closed
mrts opened this issue Jun 11, 2020 · 1 comment
Closed

Provide a mechanism for handling duplicate navigation #302

mrts opened this issue Jun 11, 2020 · 1 comment

Comments

@mrts
Copy link

mrts commented Jun 11, 2020

What problem does this feature solve?

A mechanism is needed for handling duplicate navigation.

This has been requested in vuejs/vue-router#974.

The following comment vuejs/vue-router#974 (comment) has received 57 upvotes:

Vue Router should respect the "default" behavior of any "normal" link.

On a simple HTML page, when clicking on the link of the page we already are on, the page reload. And I think Vue Router should not alter this default behavior, because it's what most user using the web is expecting.

What does the proposed API look like?

Another comment vuejs/vue-router#974 (comment) that has received 33 upvotes, suggests providing a new configuration option duplicateNavigationPolicy that provides reload, reject and ignore policies for handling duplicate navigation. The proposed API looks as follows:

const router = new Router({
    duplicateNavigationPolicy: 'reload' // or 'ignore', 'reject', or maybe a callable
})
@posva
Copy link
Member

posva commented Jun 11, 2020

Please don't open duplicates

@posva posva closed this as completed Jun 11, 2020
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

2 participants