Initializing a pinia store
When / Where would be the best practice / optimal place to initialize a pinia store? is app.vue the place to be or would you create one or multiple plugins to handle this?
4 Replies
What do you mean by “initialise”?
You’d define your stores and consume them when required. There’s not really much to initialise
Hello @Henrik Sjödahl ,
When you add the pinia store to your application, you can create a folder for stores and initialize your first store there under a specific file.
The order of modules in the
nuxt.config.ts
file can matter in terms of initialization and depsWow, okay that was easy enough, thanks!