Hot-reload resets component state (What is best practice?)
Hi,
What is some best practice ways to handle state in a hybrid Nuxt3 app?
and a server/api/me/index.get.ts
Thanks
What is some best practice ways to handle state in a hybrid Nuxt3 app?
The issue
When i navigate to the test page I get the profile, but whenever I change something and save(hot-reloading), the profile ends up undefined. I can use null-safe access and conditions to not get errors. But I would still need manually reload the page to work with the date. Is this the intended way?Solution?
Run fetch onMounted? Global state with useState/Pinia? Re-populate the date using the Nuxt server cache?Code
I have a text.vue page like thisand a server/api/me/index.get.ts
Thanks
