]> git.ipfire.org Git - thirdparty/vuejs/pinia.git/commitdiff
docs: remove outdated nuxt section
authorEduardo San Martin Morote <posva13@gmail.com>
Wed, 13 Jul 2022 09:52:09 +0000 (11:52 +0200)
committerEduardo San Martin Morote <posva@users.noreply.github.com>
Wed, 13 Jul 2022 10:32:58 +0000 (12:32 +0200)
packages/docs/ssr/nuxt.md

index 72e5814d5ea07f5b192da3790d2483f8893e6a97..d8c2156de076d60eca508459f15d49e09e658883 100644 (file)
@@ -43,25 +43,6 @@ export default {
 }
 ```
 
-## Using the Nuxt context in stores
-
-You can also use [the context](https://nuxtjs.org/docs/2.x/internals-glossary/context) in any store by using the injected property `$nuxt`:
-
-```js
-import { useUserStore } from '~/stores/userStore'
-
-defineStore('cart', {
-  actions: {
-    purchase() {
-      const user = useUserStore()
-      if (!user.isAuthenticated()) {
-        this.$nuxt.redirect('/login')
-      }
-    },
-  },
-})
-```
-
 ## 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: