useAsyncData can‘t watch slug
See original GitHub issueEnvironment
- Operating System:
Darwin
- Node Version:
v16.14.0
- Nuxt Version:
3.0.0-rc.2
- Package Manager:
pnpm@6.23.6
- Builder:
vite
- User Config:
modules
,experimental
,unocss
,colorMode
- Runtime Modules:
@vueuse/nuxt@8.3.1
,@unocss/nuxt@0.32.9
,@pinia/nuxt@0.1.8
,@nuxtjs/color-mode@3.0.2
- Build Modules:
-
Reproduction
https://stackblitz.com/edit/github-wp5lsq-fyzsuf?file=pages/[slug].vue
Describe the bug
useAsyncData cannot update data correctly when watch slugs
Additional context
No response
Logs
No response
Issue Analytics
- State:
- Created a year ago
- Reactions:3
- Comments:6 (2 by maintainers)
Top Results From Across the Web
Nuxt V3 getByUID trying to get documents from prismic but won't ...
const { data: proyecto } = await useAsyncData(slug, () => client.getByUID('proyecto', slug)) ... I can't see a UID field in your custom types...
Read more >Nuxt dynamic page slug not changing in asyncdata
In a project I'm working on I have a dynamic page in pages/news/_slug.vue. I use the asyncData hook to fetch the data that...
Read more >Data Fetching - Nuxt
In Nuxt we have 2 ways of getting data from an API. We can use the fetch method or the asyncData method. Nuxt...
Read more >Understanding Difference Between Asyncdata Fetch Nuxt
Nuxt provides two useful hooks for fetching data: AsyncData and Fetch. They're available at different times in the Nuxt lifecycle, ...
Read more >Nuxt3 doesn't fetch new data after client-side navigation : r/Nuxt
Isn't the slug page component always destroyed after navigation ... Can't believe Next.js founder said my open source project is 'fantastic'.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@sangyookim-ogq kindly create a new issue instead of replying to old closed ones ☺️ (Feel free to link this one in your new issue though). And please provide a reproduction!
My data wont refresh after the first time.
PageA -> PageB[AsyncData with param 1| Works] -> Back button to Page A -> PageB[AsyncData with param2| stuck in param 1 data]