Skip to content

Commit

Permalink
docs: add info about server-components async limits (#18513)
Browse files Browse the repository at this point in the history
  • Loading branch information
madebyfabian committed Jan 25, 2023
1 parent 1d68b51 commit 3fcfa33
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions docs/2.guide/2.directory-structure/1.components.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 3fcfa33

Please sign in to comment.