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

if leaving nested route, child page is unmounted before suspense resolves #20798

Closed
danielroe opened this issue May 12, 2023 · 5 comments · Fixed by #21823
Closed

if leaving nested route, child page is unmounted before suspense resolves #20798

danielroe opened this issue May 12, 2023 · 5 comments · Fixed by #21823

Comments

@danielroe
Copy link
Member

stackblitz.com/edit/github-f4gpfk-qhgrfy?file=pages/test.vue

#13814 (comment)

@daehyun-thevc
Copy link

daehyun-thevc commented May 17, 2023

I am having a similar problem. Only the child page, not parent, of the new nested route are being set up before page:start so child can't receive props properly from async parent. After page:start, both parent and child implement each setup, so it looks fine but error printed in console.

Copy link
Member Author

@daehyun-thevc would you post a reproduction so when we resolve this we can verify your use case is also covered?

@daehyun-thevc
Copy link

https://stackblitz.com/edit/github-szoey5?file=pages/index.vue
when navigating from /basecamp to /mountain which is async nested route, mountain/index.vue implements setup function before mountain.vue implements setup function, so there is undefined prop mountain

image

@Luffyyy
Copy link

Luffyyy commented May 21, 2023

I know this is being a bit pushy, but this issue is kinda related to the suspensible issue that Vue 3.3 fixed, but unfortunately hasn't fixed that specifically. I'd totally appreciate it (and I hope more that have this issue upvote it) if it got fixed already, I've been waiting months and this is the only major issue I have with Nuxt right now. 🚀

@danielroe danielroe self-assigned this May 21, 2023
@emaung
Copy link

emaung commented May 22, 2023

Heya yep. I agree that this needs a bit of priority. I am half way in my project and we keep building it hoping this will be fixed soon. Just that user experience is not very good with half of the page missing whenever change route.

Is there any workaround during the meantime?

Btw, totally appreciate and thank you for the time and effort you guys are putting in to bring this brilliant library.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants