N
Nuxt2mo ago
vitta

useAsyncData works only on reload

I know i am probably missing something trivial, or worse i didn't understand at all nuxt. In my nuxt3 installation i'm using contentful and its sdk to retrive information for the pages of a website. I created a plugin for the client, and in the index page i am able to connect to the api and retrieve the infos. Then if i switch to the test page and back to the index, to data is null. Only when reloading i can see the data. For the love of god, what am i missing? what i didn't understand about nuxt? Actually is working fine 'cause when i run npm run generate the crawler get all the contents, but it's driving me mad i'm not able to understand why in ssr it's not working. Her's a quick reproduction of my problem https://stackblitz.com/edit/nuxt-starter-idrmrx?file=pages%2Findex.vue Can somebody please help me understand or point me in to the right direction to solve this problem? Thanks you all
logovitta
StackBlitz
nuxt with contentful - StackBlitz
A Nuxt.js project based on contentful and nuxt
0 Replies
No replies yetBe the first to reply to this messageJoin