From 152c99031f0d7fdad436bbd03c927f398dd028d7 Mon Sep 17 00:00:00 2001 From: Eduardo San Martin Morote Date: Mon, 16 Oct 2023 11:50:48 +0200 Subject: [PATCH] docs: auto imports --- packages/docs/ssr/nuxt.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/docs/ssr/nuxt.md b/packages/docs/ssr/nuxt.md index 6d73bb0a46..95e7e3878b 100644 --- a/packages/docs/ssr/nuxt.md +++ b/packages/docs/ssr/nuxt.md @@ -64,7 +64,8 @@ const { data } = await useAsyncData('user', () => store.fetchUser()) By default `@pinia/nuxt` exposes a few auto imports: - `usePinia()`, which is similar to `getActivePinia()` but works better with Nuxt. You can add auto imports to make your life easier: -- `defineStore()` +- `defineStore()` to define stores +- `storeToRefs()` when you need to extract individual refs from a store - `acceptHMRUpdate()` for [hot module replacement](../cookbook/hot-module-replacement.md) It also automatically imports **all stores** defined withing your `stores` folder. It doesn't lookup for nested stores though. You can customize this behavior by setting the `storeDirs` option: