mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-26 07:32:01 +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.
|
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
|
||||||
|
|
||||||
`.server` components are fallback components of `.client` components.
|
`.server` components are fallback components of `.client` components.
|
||||||
|
Loading…
Reference in New Issue
Block a user