Fix async-await syntax (#6554)

This commit is contained in:
Jamie Kyle
2024-01-17 17:51:27 -08:00
committed by GitHub
parent 6bfde58c10
commit 7a15e96aef

View File

@@ -337,7 +337,7 @@ When passing a Promise from a Server Component to a Client Component, its resolv
A Promise can be passed from a Server Component to a Client Component and resolved in the Client Component with the `use` Hook. You can also resolve the Promise in a Server Component with `await` and pass the required data to the Client Component as a prop.
```js
export default function App() {
export default async function App() {
const messageContent = await fetchMessage();
return <Message messageContent={messageContent} />
}