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

Add BackstackEntry to $navigateBack #1025

Open
vallemar opened this issue Jan 8, 2023 · 2 comments
Open

Add BackstackEntry to $navigateBack #1025

vallemar opened this issue Jan 8, 2023 · 2 comments
Labels
feature request A request for adding a missing feature V3 Issues related to V3

Comments

@vallemar
Copy link
Contributor

vallemar commented Jan 8, 2023

When we want to navigate backwards, removing pages from the stack, it is not possible to do it if it is not done with the Frame.
An example of doing it manually is the following:

const frame = Frame.topmost()
const backStack = frame.backStack
const entry = backStack[0] // your destination here
frame.goBack(entry);

The problem with doing it manually and not through ns-vue is that custom routers lose navigation history

@rigor789 rigor789 added feature request A request for adding a missing feature V3 Issues related to V3 labels Mar 1, 2023
@rigor789
Copy link
Member

rigor789 commented Mar 1, 2023

The problem with doing it manually and not through ns-vue is that custom routers lose navigation history

That shouldn't matter if the custom router relies on the frame/page events to keep track of it's internal history. If the router implements it's separate history - that's going to be an issue in various cases where it can get desync'd from the actual state.

But regardless, this is useful to implement on the $navigateBack apis 👍

@vallemar
Copy link
Contributor Author

vallemar commented Mar 1, 2023

I didn't know about these events, I'll take a look and try to change the plugin I'm using to vue3. thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request A request for adding a missing feature V3 Issues related to V3
Development

No branches or pull requests

2 participants