Skip to content

Commit

Permalink
docs(fetching-data-and-streaming): add missing types to example
Browse files Browse the repository at this point in the history
  • Loading branch information
devpla committed Dec 26, 2024
1 parent 34ed922 commit 48d9b88
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down

0 comments on commit 48d9b88

Please sign in to comment.