From e416ef1bddf05530245ccbac1e4a94b7f59cb459 Mon Sep 17 00:00:00 2001 From: Andrey Yolkin Date: Wed, 16 Aug 2023 01:21:00 +0300 Subject: [PATCH] feat(docs): better explanation of useNuxt() --- docs/3.api/4.advanced/2.kit.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/3.api/4.advanced/2.kit.md b/docs/3.api/4.advanced/2.kit.md index 7748521133..5d3950ff88 100644 --- a/docs/3.api/4.advanced/2.kit.md +++ b/docs/3.api/4.advanced/2.kit.md @@ -990,7 +990,7 @@ An object with the following properties: [source code](https://github.com/nuxt/nuxt/blob/main/packages/kit/src/context.ts) ::alert{type=info} -Keep in mind, Nuxt already pass itself as the second argument to the `setup` function, so you can use it instead of `useNuxt()` call. `useNuxt()` and `tryUseNuxt()` calls are useful when you want to access Nuxt in separate functions. You can look at [Nuxt Site Config](https://github.com/harlan-zw/nuxt-site-config) as a reference. +When you're working with the `setup` function in Nuxt modules, Nuxt is already provided as the second argument. This means you can directly utilize it without needing to call `useNuxt()`. However, if you want to access Nuxt from other functions, then you can use `useNuxt()` or `tryUseNuxt()`. You can look at [Nuxt Site Config](https://github.com/harlan-zw/nuxt-site-config) as an example of usage. :: ### `useNuxt()`