docs: add info about server-components async limits (#18513)

This commit is contained in:
Fabian B 2023-01-25 14:10:25 +01:00 committed by GitHub
parent 1d68b51c2c
commit 3fcfa33142
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -276,6 +276,10 @@ Now you can register server-only components with the `.server` suffix and use th
</template>
```
::alert{type=info}
Please note that there is a known issue with using async code in a server component. It will lead to a hydration mismatch error on initial render. See [#18500](https://github.com/nuxt/nuxt/issues/18500#issuecomment-1403528142). Until there is a workaround, server-components must be synchronous.
::
### Paired with a `.client` component
In this case, the `.server` + `.client` components are two 'halves' of a component and can be used in advanced use cases for separate implementations of a component on server and client side.