-
-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
Nested components in detached branch render while being detached #5513
Comments
How likely is it that this will be fixed? |
This comment was marked as spam.
This comment was marked as spam.
This comment was marked as spam.
This comment was marked as spam.
Made this that could probably be a solution: #6736 |
@antfu Awesome :3, will this also apply to keep-alive components ? |
Any updates on this issue? Would be great if we can just use page transitions without having to worry about redirecting too fast.. (nuxt/nuxt#13350) |
I checked reproduction in the description with vue v3.3.0-beta.1. I added prop PS. If you add |
Version
3.2.31
Reproduction link
sfc.vuejs.org/
Steps to reproduce
What is expected?
What is actually happening?
I have a few errors that seem to be related and I'm struggling to find a better way of doing things. Currently, the router renders nested routes by providing an incrementing depth. But this causes situations like:
<Suspense>
triggers Vue unhandled error router#1319The problem is that while the route changes and triggers an update in the root router view component, in some of these scenarios (like Suspense and Keep alive), the nested router views manage to render (or at least call their render function) once before the parent actually tries to render itself, making them mount a nested component of a different route to be immediately discarded or never used. Then the root router view renders the correct page and its nested router view renders the correct view too. This doesn't happen in plain
<router-view>
usage. I tried a few solutions to this. I even tried creating a shallow ref inside the root RouterView, that is provided to its children and that only changes after the navigation has finished but this encounters race issues and is overall flaky.The text was updated successfully, but these errors were encountered: