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
navigating from one nested route to another nested route isn't synchronous #14860
Comments
That's because for a short time the API call hasn't resolved yet and Why don't you call the data in the page itself? It's a bit of an odd setup currently with both the |
It would be completely unwise to fetch the same data on each page separately. Therefore, it is a child, so that I do not have to fetch 5-6 times the same data. There is a parent who does it once and passes the data on to all children. This is the correct approach. In Nuxt 2 this worked fine. |
Oh I see (one of) the issue(s), you're using However, even if using I wonder if it's some underlying Vue Router behavior where the component doesn't get unmounted but reused and If you use a normal structure without the double |
Yes, I meant $fetch instead of useFetch. Still, the problem persists. In addition to the index.vue page, I have 5 others, and there may be even more in the future. Do I really have to duplicate the data fetching in each of them, instead of doing it once in the parent and just pass as prop? |
Having the same issue trying to navigate from one nested route to another nested router. |
@danielroe https://stackblitz.com/edit/github-lgscbs-qf3ajp?file=nuxt.config.ts still happens on latest Edge 😔 |
I confirm this issue is still present. Moreover - this does not seem like a rare use case. I think many applications have nested routes and they have this problem. Can any intervention be expected in this matter? It's an annoying issue. |
Intervention is expected - we have a PR pending against vue itself: vuejs/core#6736 |
@danielroe I'm still suffering from this problem from project to project, I don't understand why the vue team can't fix it for so long |
@antfu and I are discussing another possible solution within Nuxt itself. We appreciate how frustrating this is and will see what can be done. |
This looks like the same bug. Can anything be done about it? I see this problem has been going on for a long time. After all, that's a pretty basic application use case. I have a lot of nested pages and it's really annoying. Navigating between nested routes is broken even in production mode (the data only changes after the page is rendered). |
@mblachlov24 Please read above: #14860 (comment) |
Because of such problems, Nuxt 3 becomes simply useless.... |
I am having this issue still with 3.6.0 I have lots of nested pages too, this makes them unusable, any work around available for this except not using nested pages at all? |
|
Environment
Linux
v16.16.0
3.0.0-rc.10-27710894.0cc49e2
0.5.2-27709289.11cc5cd
npm@8.11.0
vite
experimental
,typescript
,vite
Reproduction
Go to the website and navigate between the links.
https://stackblitz.com/edit/github-lgscbs?file=pages/users/[id].vue
Describe the bug
When we go from one page to the other (which has a child with prop from api), we get the aforementioned warning.
Additional context
No response
Logs
No response
The text was updated successfully, but these errors were encountered: