docs: clarify reactivity in composables directory (#23731)

This commit is contained in:
Nils Wiesinger 2024-01-16 12:36:53 +01:00 committed by GitHub
parent f310dd1e2d
commit 4ab15c3a4b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -38,6 +38,10 @@ const foo = useFoo()
</template>
```
::alert{type=info}
The `composables/` directory in Nuxt does not provide any additional reactivity capabilities to your code. Instead, any reactivity within composables is achieved using Vue's Composition API mechanisms, such as ref and reactive. Note that reactive code is also not limited to the boundaries of the `composables/` directory. You are free to employ reactivity features wherever they're needed in your application.
::
:read-more{to="/docs/guide/concepts/auto-imports"}
:link-example{to="/docs/examples/features/auto-imports"}