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.

`useAsyncData` clears out nested route data before leaving

See original GitHub issue

Environment


  • Operating System: Darwin
  • Node Version: v16.14.2
  • Nuxt Version: 3.0.0-rc.1
  • Package Manager: pnpm@6.32.8
  • Builder: vite
  • User Config: build, buildModules, components, css, srcDir, typescript, vite, server
  • Runtime Modules: -
  • Build Modules: @intlify/nuxt3@0.1.10, @pinia/nuxt@0.1.8, nuxt-windicss@2.3.1

Reproduction

https://stackblitz.com/edit/github-ypbf5b?file=app.vue To reproduce the issue, load the website with the url /users/foo and click Go Home

Describe the bug

useAsyncData clears out nested route data before leaving. If the next route is still loading, it produces a blank page, which isn’t great 😢 Maybe it is due to provide/inject.

Additional context

https://user-images.githubusercontent.com/24970784/164979549-cdb21c9c-f791-4a6a-9c7d-a1084f2c78e8.mov

Logs

No response

Issue Analytics

  • State:open
  • Created a year ago
  • Reactions:2
  • Comments:17 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
mvrlincommented, Nov 1, 2022

I have the same problem. @mvrlin did you find any workaround for this?

Unfortunately, no 😦

1reaction
danielroecommented, Apr 25, 2022

This looks like it might be the same issue as https://github.com/vuejs/core/issues/5513.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How To Handle Async Data Loading, Lazy Loading, and Code ...
In future versions of React, you'll be able to use Suspense to load data in nested components without render blocking.
Read more >
Supercharged GitHub Experience · Volta - Volta.Net
useFetch Type Safety With Multiple HTTP Method API Routes. enhancement ... `useAsyncData` clears out nested route data before leaving. upstream upstream-bug
Read more >
Why can't I access useAsyncData in a Nuxt 3 script setup tag ...
I'm using the Prismic API to get some data that I want to show in my Nuxt3 template.
Read more >
Adding Nested Routes - Tutorial - Ember Guides
Our rentals route is going to serve multiple functions. ... The index nested route is shown by default when the user visits the...
Read more >
Angular Router: Child Routes, Auxiliary Routes, Master Detail
In this post, we are going to do a guided tour of the main routing configuration concepts needed to use the Angular Router...
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