]> git.ipfire.org Git - thirdparty/vuejs/pinia.git/commitdiff
docs: disableVuex
authorEduardo San Martin Morote <posva13@gmail.com>
Wed, 31 Mar 2021 09:40:34 +0000 (11:40 +0200)
committerEduardo San Martin Morote <posva13@gmail.com>
Wed, 31 Mar 2021 09:40:34 +0000 (11:40 +0200)
docs/ssr/nuxt.md

index 77497d8b0dfcafda2e9cc6c995176b93bf7c1f7d..561a894e25dce1f02994dbcb170aa7f26fa0635b 100644 (file)
@@ -61,6 +61,21 @@ defineStore({
 })
 ```
 
+## Using Pinia alongside Vuex
+
+It is recommended to **avoid using both Pinia and Vuex** but if you need to use both, you need to tell pinia to not disable it:
+
+```js
+// nuxt.config.js
+export default {
+  buildModules: [
+    '@nuxtjs/composition-api',
+    ['pinia/nuxt', { disableVuex: false }],
+  ],
+  // ... other options
+}
+```
+
 ## Typescript
 
 If you are using TypeScript or have a `jsconfig.json`, you should also add the types for `context.pinia`: