From d2dba5030ae8e86d414faa5a64acdbb0ceac23db Mon Sep 17 00:00:00 2001 From: chaeyeonhee Date: Thu, 19 Dec 2024 01:21:49 +0900 Subject: [PATCH] docs(fetching-data-and-streaming): add missing types to example --- .../01-getting-started/06-data-fetching-and-streaming.mdx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/docs/01-app/01-getting-started/06-data-fetching-and-streaming.mdx b/docs/01-app/01-getting-started/06-data-fetching-and-streaming.mdx index 71bd6bfa35ac7d..9afc36474a990b 100644 --- a/docs/01-app/01-getting-started/06-data-fetching-and-streaming.mdx +++ b/docs/01-app/01-getting-started/06-data-fetching-and-streaming.mdx @@ -136,7 +136,11 @@ Then, in your Client Component, use the `use` hook read the promise: 'use client' import { use } from 'react' -export default function Posts({ posts }) { +export default function Posts({ + posts, +}: { + posts: Promise<{ id: string; title: string }[]> +}) { const posts = use(posts) return (