question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

navigating from one nested route to another nested route isn't synchronous

See original GitHub issue

Environment

  • Operating System: Linux
  • Node Version: v16.16.0
  • Nuxt Version: 3.0.0-rc.10-27710894.0cc49e2
  • Nitro Version: 0.5.2-27709289.11cc5cd
  • Package Manager: npm@8.11.0
  • Builder: vite
  • User Config: 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

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

3reactions
Luffyyycommented, Oct 3, 2022

Having the same issue trying to navigate from one nested route to another nested router.

1reaction
TheDutchCodercommented, Sep 10, 2022

That’s because for a short time the API call hasn’t resolved yet and data is not yet set.

Why don’t you call the data in the page itself? It’s a bit of an odd setup currently with both the [id].vue page and the /[id]/index.vue page. I think you’re making it unnecessarily difficult on yourself.

Read more comments on GitHub >

github_iconTop Results From Across the Web

The Guide to Nested Routes with React Router - ui.dev
In this comprehensive, up-to-date guide, you'll learn everything you need to know about creating nested routes with React Router.
Read more >
How can I navigate to a nested Route in React Router Dom V6
I'm trying to open a nested Route from within a nav element. The App itself runs under /app (as such I redirect any...
Read more >
A Comprehensive Guide to React Router - CoderPad
Nested routes are an aspect of React Router we need to understand; this feature enables us to handle routing with a different approach....
Read more >
The Most Complete Guide for React Navigation - CopyCat Blog
Routes can be nested inside a parent route and their paths will also be nested. This aids in simplifying the code layout. Let...
Read more >
Complete guide to authentication with React Router v6
Using nested routes and <Outlet /> ; /dashboard/profile the router will render the ; <ProfilePage /> . In order for this to occur,...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found