mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-25 15:15:19 +00:00
docs: add warning about .client
onMounted hook (#9263)
This commit is contained in:
parent
69e46a1873
commit
f1026d4e88
@ -204,6 +204,10 @@ If a component is meant to be rendered only client-side, you can add the `.clien
|
||||
This feature only works with Nuxt auto-imports and `#components` imports. Explicitly importing these components from their real paths does not convert them into client-only components.
|
||||
::
|
||||
|
||||
::alert{type=warning}
|
||||
`.client` components are rendered only after being mounted. To access the rendered template using `onMounted()`, add `await nextTick()` in the callback of the `onMounted()` hook.
|
||||
::
|
||||
|
||||
## .server Components
|
||||
|
||||
`.server` components are fallback components of `.client` components.
|
||||
|
Loading…
Reference in New Issue
Block a user