N
Nuxtβ€’2y ago
ILLuMiNaTe

nuxtServerInit in Nuxt3

In Nuxt2 there was a nice function called nuxtServerInit. However in Nuxt3 this function no longer exists. The issue is I'm having is as follows: For some reason when i have a plugin that executes a $fetch during SSR it executes this around 4-5 times. That of course shouldn't happen. Is there anyway how to do a $fetch to get a initial response?
1 Reply
πŸ‡¨πŸ‡­ Marko Bolliger <cannap>
nuxtServerInit was a axios action but maybe you can use useState inside a plugin? when you dont have a state management like pinia
Want results from more Discord servers?
Add your server