To much pinia versions! π?
So far, I've heard that there are different approaches to Pinia: Pinia v1 (Options API), Pinia v2 (Composition API), with Pinia currently at version 2.1.7.
And there's also something called pinia/nuxt": "^0.5.1".
Which one should I use in Nuxt 3?
8 Replies
Use
@pinia/nuxt
.Thanks! so I follow the structure of Pinia v1 (Options API)?
I'd use setup stores if possible
so, 'setup stores' are a style
that I should use, Im taking notes since I dont know about this yet
I want to store in pinia de logic of auth, and user, makes sense?
It's closer to Composition API from Vue and that is definitely a way to go.
the logic has some complexity, with the ID I fecth for profile info...
And I thought, this is context
And everyone is talking about Composition API
could you tell me about the setup stores? I want to search how they are usefull and closer to Composition API
Pinia π
Intuitive, type safe, light and flexible Store for Vue
thanks!
ah, so options is using state:, actions: and setup stores is more like a regular component
ok, I should go deeper
Thanks