From: Eduardo San Martin Morote Date: Wed, 13 Jul 2022 09:52:09 +0000 (+0200) Subject: docs: remove outdated nuxt section X-Git-Tag: @pinia/nuxt@0.3.0~7 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6029c1ff3eb0a44a9fa3175f30032d16f64fc5eb;p=thirdparty%2Fvuejs%2Fpinia.git docs: remove outdated nuxt section --- diff --git a/packages/docs/ssr/nuxt.md b/packages/docs/ssr/nuxt.md index 72e5814d..d8c2156d 100644 --- a/packages/docs/ssr/nuxt.md +++ b/packages/docs/ssr/nuxt.md @@ -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: