rsnext/errors/no-async-client-component.mdx
Delba de Oliveira 44d1a1cb15
docs: Migrate error messages to MDX and App Router. (#52038)
This PR is part of a larger effort to migrate error messages to MDX and
use App Router: https://github.com/vercel/front/pull/23459
2023-07-05 06:11:16 -07:00

14 lines
645 B
Text

---
title: No async client component
---
> Client components cannot be async functions.
## Why This Error Occurred
As per the [React Server Component RFC on promise support](https://github.com/acdlite/rfcs/blob/first-class-promises/text/0000-first-class-support-for-promises.md), [client components cannot be async functions](https://github.com/acdlite/rfcs/blob/first-class-promises/text/0000-first-class-support-for-promises.md#why-cant-client-components-be-async-functions).
## Possible Ways to Fix It
1. Remove the `async` keyword from the client component function declaration, or
2. Convert the client component to a server component