You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For anyone else with this issue, I found a work around. Give the 2nd level routerviews each a unique name, then in router.ts set that as the view for your child components.
Some of this behavior is inherent to KeepAlive and how it keeps updating components that are kept alive. Check this Vue playground to give you an idea of the behavior:
Change page twice
click increment
Both components keep updating in the background
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Reproduction
https://github.com/CrimsonFez/vuejs-keep-alive-router-bug/
Steps to reproduce the bug
You need to have nested RouterView + KeepAlives like:
App.vue
MyLayoutAndGetter1.vue
MyLayoutAndGetter2.vue
I believe that you also need to pass props through one of the router views, see https://github.com/CrimsonFez/vuejs-keep-alive-router-bug/blob/main/src/views/Person.vue
See my linked repo for full reproduction.
Expected behavior
This should behave like normal, when KeepAlive is not used
Actual behavior
When changing from one nested routerview to the other, it looks like props from the old router view are temporarily attached to the new router view
In my reproduction, this just causes an error, but on my larger app, this causes a crash.
Additional information
No response
The text was updated successfully, but these errors were encountered: