-
-
Notifications
You must be signed in to change notification settings - Fork 5.4k
Closed
Labels
Description
Environment
- Operating System:
Linux
- Node Version:
v16.18.0
- Nuxt Version:
3.0.0-rc.12
- Nitro Version:
0.6.0
- Package Manager:
yarn@1.22.19
- Builder:
vite
- User Config:
buildModules
- Runtime Modules:
-
- Build Modules:
@pinia/nuxt@0.4.3
Reproduction
- Clone issue repo
git clone https://github.com/ian4uia/nuxt3rc12-datafetch
- Install app
cd nuxt3rc12-datafetch
yarn install
- Run dev server
yarn run dev
- Go to localhost:3000. The page fetches a random dog image.
- Click on the page 2 link to open the second page.
- Now click on the 'Go Back' button to return to the main page.
- See the bug. The page should refresh the data and show a new image of a dog but it hangs showing the 'Loading...' text indefinitely.
Describe the bug
When index.vue is loaded for the first time useLazyAsyncData is run successfully and the data and refresh function are returned. You can test the refresh function using the button to verify this. On subsequent visits to the index page from pages within the app
useLazyAsyncData is not run because we already have data. However, we may decide to refresh the data using the refresh function but it doesn't work in this context. I've tested the app with rc11 and it works as expected.
Additional context
No response
Logs
No response
jgupta, baixiaoyu2997, praveshishere and jf908