From fc3041a2f0b1552a24adc5857026a44430d86470 Mon Sep 17 00:00:00 2001 From: "shiwoo.park" Date: Tue, 4 Jul 2023 05:33:37 +0900 Subject: [PATCH] docs(ssr): update note about async server component ts error This issue has been fixed now in https://github.com/vercel/next.js/pull/50557 --- docs/react/guides/ssr.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/react/guides/ssr.md b/docs/react/guides/ssr.md index 87b926743f..6e0419bd91 100644 --- a/docs/react/guides/ssr.md +++ b/docs/react/guides/ssr.md @@ -417,7 +417,7 @@ Fetch your data in a Server Component higher up in the component tree than the C - Wrap the component tree that needs the prefetched queries inside ``, and provide it with the dehydrated state - You can fetch inside multiple Server Components and use `` in multiple places -> NOTE: TypeScript currently complains of a type error when using async Server Components. As a temporary workaround, use `{/* @ts-expect-error Server Component */}` when calling this component inside another. For more information, see [End-to-End Type Safety](https://beta.nextjs.org/docs/configuring/typescript#end-to-end-type-safety) in the Next.js 13 beta docs. +> NOTE: If you encounter a type error while using async Server Components with TypeScript versions lower than `5.1.3` and `@types/react` versions lower than `18.2.8`, it is recommended to update to the latest versions of both. Alternatively, you can use the temporary workaround of adding `{/* @ts-expect-error Server Component */}` when calling this component inside another. For more information, see [Async Server Component TypeScript Error](https://nextjs.org/docs/app/building-your-application/configuring/typescript#async-server-component-typescript-error) in the Next.js 13 docs. ```tsx // app/hydratedPosts.jsx