NuxtN
Nuxt17mo ago
Redeemr

Pinia localstorage Hydration Issues

hey guys, I am currently using pinia and the pinia-plugin-persisted-state plugin to store values from my pinia store. Originally I was using cookies but the size of the store got too large to be stored that way. I switched over to using localstorage and whenever I refresh the page, I get tons of hydration errors because localstorage isnt available on the server. I am able to resolve this by wrapping most of the app in <ClientOnly> but I am wondering what other solutions are there to resolving this problem?
Was this page helpful?