N
Nuxt2mo ago
Dan

useAsyncData render initial page loader in SPA

Is there a way to render an initial skeleton screen if there's some initial data I want loaded while in SPA mode? I've tried a few things, the closest I got (which works, however with a warning) is conditionally rendering <NuxtPage> in app.vue while using useLazyAsyncData's status.
1 Reply
Dan
DanOP2mo ago
Resolved this. I ended up using the spa-loading-template I initially tried this approach but didn't realize the following issue existed https://github.com/nuxt/nuxt/issues/21721 . Using the approach here I was able to get the intended effect.
GitHub
Keep showing the spa-loading-template until page:finish · Issue #21...
Describe the feature It would be nice to show the spa loading template until the 'page:finish' event. When using Nuxt with SSR turned off and using the spa-loading-template to show a loadin...
GitHub
GitHub - Isa3v/nuxt-spa-loading-template: This Nuxt 3 module provid...
This Nuxt 3 module provides a temporary solution for the issue identified in Nuxt.js GitHub Issue #21721. - Isa3v/nuxt-spa-loading-template
Want results from more Discord servers?
Add your server