Skip to content

Clearing navigation stack with clearHistory does not destroy components #339

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

Closed
lsapan opened this issue Oct 6, 2018 · 1 comment
Closed

Comments

@lsapan
Copy link

lsapan commented Oct 6, 2018

Version

2.0.0

Reproduction link

https://play.nativescript.org/?template=play-vue&id=U02vb8&v=2

Platform and OS info

iOS 12 / NativeScript 5 (and presumably 4 in Playground) / macOS Mojave

Steps to reproduce

The repro sample is a simple three step "app". Once you finish the third step, it takes you back to the first.

From Step 1, tap the next button. In Step 2, hit the back button. Notice how Step 2 is properly destroyed (as noted in the console).

Now, tap through to Step 3, and hit the start over button. This pushes a new Step 1 on while clearing the history (note the lack of a back button). However, the prior steps are not destroyed.

What is expected?

The prior views should be destroyed when clearing the navigation stack.

What is actually happening?

The prior views become unreachable, but stick around.


Obviously in this app it isn't a big deal that the views become ghosts. However in practice, a vuex store may be involved, causing issues when views that expect a certain state suddenly see the state change (when they shouldn't be around anymore).

@nativescript-vue-bot
Copy link
Collaborator

We are locking this issue because it has been closed for more than 14 days.

If the issue comes up again please open a new issue with additional details.

@nativescript-vue nativescript-vue locked as resolved and limited conversation to collaborators Oct 22, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Development

No branches or pull requests

2 participants