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

Allow passing transient info in navigations #1780

Open
atom-git opened this issue Apr 6, 2023 · 2 comments
Open

Allow passing transient info in navigations #1780

atom-git opened this issue Apr 6, 2023 · 2 comments
Labels
enhancement New feature or request needs RFC This feature needs to go through the RFC process first

Comments

@atom-git
Copy link

atom-git commented Apr 6, 2023

What problem is this solving

This would allow passing information specific to the navigation (https://github.com/WICG/navigation-api#example-using-info)

Proposed solution

TBD
This requires an RFC

Copy link
Member

posva commented Apr 6, 2023

This is what we call transient state (state available only during navigation) and is planned in a way that would align with the upcoming navigation API (https://github.com/WICG/navigation-api#example-using-info). It would require going through an RFC first though

@posva posva added enhancement New feature or request needs RFC This feature needs to go through the RFC process first labels Apr 6, 2023 — with Volta.net
@posva posva changed the title router meta data support push change Allow passing transient info in navigations Apr 6, 2023
@posva posva moved this to 🆕 Triaging in Vue Router Roadmap Jun 10, 2024
@jods4
Copy link

jods4 commented Dec 16, 2024

Big +1 for transient state!

  • It has some useful applications (not the least being force reloading a component when the route doesn't change);
  • and it's incredibly difficult to work around, the router code goes to great lengths to "normalize" everything passed in the route and only selectively copies properties.

There are few places where you could pass "hidden" state, most likely params, but in most cases only known keys will passthrough. I say "in most cases" because the code around this is relatively inconsistent. For example if you're modifying the current route and pass no name, params doesn't get normalized (for unclear reasons, seems pretty inconsistent).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request needs RFC This feature needs to go through the RFC process first
Projects
Status: 🆕 Triaging
Development

No branches or pull requests

3 participants