Skip to content

Commit 8e91b93

Browse files
docs(ssr): Updated note about TS error with async server components (#5670)
This issue has been fixed now in vercel/next.js#50557
1 parent bbdf720 commit 8e91b93

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/react/guides/ssr.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -417,7 +417,7 @@ Fetch your data in a Server Component higher up in the component tree than the C
417417
- Wrap the component tree that needs the prefetched queries inside `<Hydrate>`, and provide it with the dehydrated state
418418
- You can fetch inside multiple Server Components and use `<Hydrate>` in multiple places
419419

420-
> 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.
420+
> 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.
421421
422422
```tsx
423423
// app/hydratedPosts.jsx

0 commit comments

Comments
 (0)