Pinia and useState
Im building a new store, and remembered the newish useState composable.
Normally i would use ref in a Pinia store, but since useState is described in the docs as
useState is an SSR-friendly ref replacement.
Should i then use useState within the Pinia store?
Havent been able to find anyone else asking this question.
Im specifically using setup stores.3 Replies
This should helpful
https://stackoverflow.com/questions/72081334/nuxt-3-pinia-vs-usestate
Stack Overflow
Nuxt 3 - Pinia Vs useState()
Store (Pinia) Vs UseState
If I am not mistaken, useState can replace any store like Pinia? Given that useState makes ref sharable across all components I have a hard time knowing if I should use a ...
The question is if is should use
The vue vanilla way with ref inside the pinia store
Or if i should use useState
The guy in that question asks if they should either use Pinia or useState
There’s no point in using a global state manager insider another global state manager
Can you give an example?
I don’t think you got my point
Exactly
The second example to be precise
Yeah. Phrasing might’ve been confusing
No worries