how to use pinia in vue? #299
Replies: 2 comments
-
Hi, here is my solution for that: import { createPinia } from 'pinia'; const pinia = createPinia(); export const useStore = pinia.createStore({ import { createApp } from 'vue'; const app = createApp(App); Count: {{ count }} Increment |
Beta Was this translation helpful? Give feedback.
-
To implement Pinia in a Vue project, you can follow these steps:
This will create a basic setup for using Pinia in Vue 3. You can extend it by adding more stores, state properties, actions, and getters as needed. |
Beta Was this translation helpful? Give feedback.
-
I have a vue project and need to implement pinia, how to do it?
Beta Was this translation helpful? Give feedback.
All reactions