use는 React가 주는 함수로, 클라이언트 컴포넌트가 받은 Promise를 열어 풀린 값을 꺼냅니다. 이 레슨은 통계 쪽에 레시피 수를 세는 클라이언트 컴포넌트 Count를 두고, 서버가 만든 Promise를 기다리지 않고 넘겨 use로 여는 꼴을 씁니다.
앞 레슨들에서 기다리는 자식은 모두 서버 컴포넌트였습니다. 기다릴 값이 클라이언트 컴포넌트에 들어가야 한다면, 서버에서 읽은 값을 어떻게 넘겨 기다리게 할까요?
TypeScript 다시 보기: async 함수는 부르면 곧바로 Promise를 돌려주고, 그 타입은 Promise<값의 타입>입니다(Promise와 async의 타입). 경계를 넘는 props는 글로 바꿀 수 있는 값이어야 했습니다(경계를 넘는 props).
1기다리지 않고 Promise 넘기기
개발 서버는 켜 둔 채 따라 합니다. 통계 쪽 app/stats/page.tsx의 Page는 getRecipes()를 부르되 await하지 않습니다. getRecipes는 async 함수라 부르면 곧바로 Promise를 돌려주고, Page는 그 Promise를 그대로 Count에 넘깁니다. 맨 위 import에는 react의 Suspense, @/components/Count의 Count, @/lib/recipes의 getRecipes를 가져옵니다. 파일 전체는 2절 접기에 있습니다.
…
export default function Page() {
const recipes = getRecipes();
// 3. 쪽에서 Suspense로 감싸기
return (
<>
<h1>통계</h1>
<Suspense
fallback={<p>세는 중</p>}
>
<Count
recipes={recipes}
/>
</Suspense>
…Page는 기다리지 않으니 async가 아니고, <Suspense> 밖에서 기다리는 일도 없습니다. 기다리는 일은 Promise를 받은 Count가 맡습니다.
2use로 Promise 열기
Count에는 누르는 것도 state도 없습니다. 이런 칸은 보통 RecipeList처럼 서버 컴포넌트로 두고 await합니다. use는 누르는 칸처럼 클라이언트 컴포넌트여야 하는 곳이 기다릴 값을 받아야 할 때 씁니다. 이 레슨은 그 꼴을 보려고 작은 Count를 클라이언트 컴포넌트로 둡니다.
components/Count.tsx를 만듭니다. 맨 위에 'use client';를 두고, react에서 use를 가져옵니다. props recipes의 타입은 레시피 배열을 주는 Promise, Promise<Recipe[]>입니다.
…
// 2. Promise를 넘기고 use로 열기
const list = use(recipes);
return (
<p>모두 {list.length}개</p>
);
…use(recipes)는 Promise가 풀릴 때까지 이 컴포넌트를 기다리게 하고, 풀리면 그 값을 줍니다. 기다리는 동안은 가장 가까운 <Suspense>의 fallback이 보입니다. 저장하고 /stats를 엽니다.
두 파일 전체 · 받은 HTML · 빌드 출력
'use client';
import { use } from 'react';
import type {
Recipe,
} from '@/lib/recipes';
// 1. 기다리는 일을 자식으로
function Count({
recipes,
}: {
recipes: Promise<Recipe[]>;
}) {
// 2. Promise를 넘기고 use로 열기
const list = use(recipes);
return (
<p>모두 {list.length}개</p>
);
}
export default Count;import {
Suspense,
} from 'react';
import Count from
'@/components/Count';
import {
getRecipes,
} from '@/lib/recipes';
export default function Page() {
const recipes = getRecipes();
// 3. 쪽에서 Suspense로 감싸기
return (
<>
<h1>통계</h1>
<Suspense
fallback={<p>세는 중</p>}
>
<Count
recipes={recipes}
/>
</Suspense>
</>
);
}<nav><a href="/recipes">목록</a>·<a href="/stats">▸ 통계</a></nav>
<h1>통계</h1>
<template id="B:0"></template>
<p>세는 중</p>
<footer>바닥글</footer>
<div hidden id="S:0">
<p>모두 4개</p>
</div> Creating an optimized production build ...
✓ Compiled successfully in 1236ms
Running TypeScript ...
Finished TypeScript in 889ms ...
Collecting page data using 8 workers ...
✓ Collecting page data using 8 workers in 257ms
Generating static pages using 8 workers (0/11) ...
Generating static pages using 8 workers (2/11)
Generating static pages using 8 workers (5/11)
Generating static pages using 8 workers (8/11)
✓ Generating static pages using 8 workers (11/11) in 420ms
Finalizing page optimization ...
✓ Finalizing page optimization in 14ms
Route (app)
┌ ◐ /
├ ○ /_not-found
├ ◐ /recipes
├ /recipes/[id]
│ ├ ◐ /recipes/[id]
│ ├ ◐ /recipes/r1
│ ├ ◐ /recipes/r2
│ └ ◐ [+2 more paths]
└ ◐ /stats
○ (Static) prerendered as static content
◐ (Partial Prerender) prerendered as static HTML with dynamic server-streamed content
받은 HTML의 껍데기에는 머리 '통계'와 fallback '세는 중'이 있고, <div hidden id="S:0"> 채움에 모두 4개가 옵니다. 서버가 Promise가 풀린 뒤 Count까지 그려 보낸 것입니다. 브라우저는 하이드레이션 때 받은 Promise로 Count를 다시 불러 같은 모두 4개를 그립니다. 빌드의 경로 표에서 /stats는 ◐입니다.
Next.js 규칙 4 넓힘. Promise도 경계를 넘는 props가 될 수 있습니다. 서버 컴포넌트는 Promise를 기다리지 않고 넘기고, 클라이언트 컴포넌트가
use로 엽니다.
해 보기 — Count를 async로
Count도 서버 컴포넌트처럼 async로 쓰고 await로 기다리면 어떨까요? Count를 async function으로 바꾸고 use(recipes)를 await recipes로 바꾼 뒤(use import도 지움) /stats를 엽니다. 어떻게 될까요? 고른 뒤 펼쳐 보세요. 맞혀 보기는 점수에 들지 않습니다.
- ① 화면은
모두 4개로 뜨지만, 브라우저 콘솔에 오류 글이 찍힌다 - ② 화면이 '세는 중'에서 멈춘다
- ③ 서버 컴포넌트처럼 오류 없이 뜬다
결과 보기
①입니다. 아래는 바꾼 Count와 2절 판 app/stats/page.tsx, 브라우저 콘솔, 화면에 보이는 <body> 안 HTML입니다.
'use client';
import type {
Recipe,
} from '@/lib/recipes';
// 1. 기다리는 일을 자식으로
async function Count({
recipes,
}: {
recipes: Promise<Recipe[]>;
}) {
const list = await recipes;
return (
<p>모두 {list.length}개</p>
);
}
export default Count;import {
Suspense,
} from 'react';
import Count from
'@/components/Count';
import {
getRecipes,
} from '@/lib/recipes';
export default function Page() {
const recipes = getRecipes();
// 3. 쪽에서 Suspense로 감싸기
return (
<>
<h1>통계</h1>
<Suspense
fallback={<p>세는 중</p>}
>
<Count
recipes={recipes}
/>
</Suspense>
</>
);
}[오류] <Count> is an async Client Component. Only Server Components can be async at the moment. This error is often caused by accidentally adding `'use client'` to a module that was originally written for the server.
[오류] A component was suspended by an uncached promise. Creating promises inside a Client Component or hook is not yet supported, except via a Suspense-compatible library or framework.
<nav><a href="/recipes">목록</a>·<a href="/stats">▸ 통계</a></nav>
<h1>통계</h1>
<p>모두 4개</p>
<footer>바닥글</footer>첫 줄의 첫 문장은 <Count>가 async인 클라이언트 컴포넌트(async Client Component)라는 뜻입니다. 다음 문장은 async는 지금 서버 컴포넌트만 될 수 있다고(Only Server Components can be async at the moment) 말합니다. 끝 문장은 서버용으로 쓴 파일에 'use client'를 잘못 붙였을 때 흔히 난다고 알려 줍니다. 둘째 줄은 클라이언트 컴포넌트 안에서 만든 Promise로 기다렸다는 알림입니다. Count 자신이 async 함수라, React가 Count를 부를 때마다 새 Promise가 생기기 때문입니다. 같은 두 줄이 서버 터미널에도 [browser] 꼬리표를 달고 찍힙니다.
다 봤으면 Count를 2절 판으로 되돌립니다.
해 보기 — Suspense를 빼면
Page는 기다리지 않으니 <Suspense>가 없어도 될까요? app/stats/page.tsx에서 <Suspense>를 빼고 Count를 바로 그립니다(Suspense import도 지움).
…
<h1>통계</h1>
<Count
recipes={recipes}
/>
…개발 서버를 끄고 npm run build를 치면 어떻게 될까요? 고른 뒤 펼쳐 보세요. 맞혀 보기는 점수에 들지 않습니다.
- ① 지나간다 —
Page는 기다리지 않으니까 - ② 지나가고,
/stats는○줄이 된다 - ③
/stats에서 멈춘다
결과 보기
③입니다. 아래는 2절 판 Count와 바꾼 쪽 파일, 빌드 출력입니다. 빌드 출력의 시간과 workers 수는 다를 수 있습니다.
'use client';
import { use } from 'react';
import type {
Recipe,
} from '@/lib/recipes';
// 1. 기다리는 일을 자식으로
function Count({
recipes,
}: {
recipes: Promise<Recipe[]>;
}) {
// 2. Promise를 넘기고 use로 열기
const list = use(recipes);
return (
<p>모두 {list.length}개</p>
);
}
export default Count;import Count from
'@/components/Count';
import {
getRecipes,
} from '@/lib/recipes';
export default function Page() {
const recipes = getRecipes();
return (
<>
<h1>통계</h1>
<Count
recipes={recipes}
/>
</>
);
} Creating an optimized production build ...
✓ Compiled successfully in 1250ms
Running TypeScript ...
Finished TypeScript in 1126ms ...
Collecting page data using 8 workers ...
✓ Collecting page data using 8 workers in 252ms
Generating static pages using 8 workers (0/11) ...
Generating static pages using 8 workers (2/11)
Generating static pages using 8 workers (5/11)
Generating static pages using 8 workers (8/11)
Error: Route "/stats": Next.js encountered uncached or runtime data during prerendering.
`fetch(...)`, `cookies()`, `headers()`, `params`, `searchParams`, or `connection()` accessed outside of `<Suspense>` prevents the route from being prerendered, blocking the page load and leading to a slower user experience.
Ways to fix this:
- [stream] Provide a placeholder with `<Suspense fallback={...}>` around the data access
- [cache] For uncached data (`fetch`, database calls): cache the access with `"use cache"` (does not apply to `connection()`)
- [block] Set `export const instant = false` to allow a blocking route
Learn more: https://nextjs.org/docs/messages/blocking-prerender-dynamic
at <unknown> (components/Count.tsx:10:3)
at body (<anonymous>)
at html (<anonymous>)
8 | // 1. 기다리는 일을 자식으로
9 | function Count({
> 10 | recipes,
| ^
11 | }: {
12 | recipes: Promise<Recipe[]>;
13 | }) {
To get a more detailed stack trace and pinpoint the issue, try one of the following:
- Start the app in development mode by running `next dev`, then open "/stats" in your browser to investigate the error.
- Rerun the production build with `next build --debug-prerender` to generate better stack traces.
Error occurred prerendering page "/stats". Read more: https://nextjs.org/docs/messages/prerender-error
Export encountered an error on /stats/page: /stats, exiting the build.
⨯ Next.js build worker exited with code: 1 and signal: null
exit=1
Page는 기다리지 않지만, Count가 use(recipes)에서 Promise가 풀리기를 기다립니다. 그 자리를 감싼 <Suspense>가 없으니 서버에서 읽기 2절처럼 빌드가 멈춥니다. 오류 글 아래의 코드 줄도 components/Count.tsx를 가리킵니다.
다 봤으면 app/stats/page.tsx를 2절 판으로 되돌리고 npm run dev로 개발 서버를 다시 띄웁니다.
예제
2절 판을 배포 판으로 엽니다. 개발 서버를 끄고 npm run build를 친 뒤 npm run start로 띄워 /stats의 받은 HTML을 봅니다. 껍데기(<div hidden> 밖)에 모두 4개가 들까요? 고른 뒤 펼쳐 보세요. 맞혀 보기는 점수에 들지 않습니다.
- ① 든다 — 빌드 때 세어 두었으니까
- ② 들지 않는다 — 요청 때 세어 채움으로 온다
- ③ 받은 HTML에
통계도 없다 — 쪽 전체가 기다린다
결과 보기
②입니다. 아래는 2절 판 파일 둘과 배포 판의 받은 HTML입니다.
'use client';
import { use } from 'react';
import type {
Recipe,
} from '@/lib/recipes';
// 1. 기다리는 일을 자식으로
function Count({
recipes,
}: {
recipes: Promise<Recipe[]>;
}) {
// 2. Promise를 넘기고 use로 열기
const list = use(recipes);
return (
<p>모두 {list.length}개</p>
);
}
export default Count;import {
Suspense,
} from 'react';
import Count from
'@/components/Count';
import {
getRecipes,
} from '@/lib/recipes';
export default function Page() {
const recipes = getRecipes();
// 3. 쪽에서 Suspense로 감싸기
return (
<>
<h1>통계</h1>
<Suspense
fallback={<p>세는 중</p>}
>
<Count
recipes={recipes}
/>
</Suspense>
</>
);
}<nav><a href="/recipes">목록</a>·<a href="/stats">▸ 통계</a></nav>
<h1>통계</h1>
<template id="B:0"></template>
<p>세는 중</p>
<footer>바닥글</footer>
<div hidden id="S:0">
<p>모두 4개</p>
</div>경로 표의 ◐ /stats대로입니다. 빌드는 머리 통계와 세는 중까지 껍데기로 그려 두었고, 레시피를 세는 일은 요청이 오면 합니다. 모두 4개는 <div hidden id="S:0"> 채움에 옵니다. 채움이 곧 이어 와 덩어리 줄은 없습니다. 개발 판과 같은 차례입니다.
다 봤으면 배포 판을 Ctrl+C로 끄고 npm run dev로 개발 서버를 다시 띄웁니다.
자주 틀리는 곳
틀린 생각: 클라이언트 컴포넌트도 async로 쓰고 await로 기다리면 된다.
맞는 규칙: async 컴포넌트는 서버 컴포넌트만 됩니다. 클라이언트 컴포넌트는 받은 Promise를 use로 엽니다(해 보기).
틀린 생각: Page에서 await getRecipes()로 기다린 배열을 넘기면 use가 필요 없어 더 낫다.
맞는 규칙: 그러면 Page가 <Suspense> 밖에서 기다리게 되어 빌드가 멈춥니다(서버에서 읽기 2절). Promise를 기다리지 않고 넘기면 껍데기가 먼저 가고, 기다리는 일은 <Suspense> 안의 Count가 맡습니다.
틀린 생각: Page가 기다리지 않으니 use로 여는 자리는 <Suspense>로 감싸지 않아도 된다.
맞는 규칙: use도 기다리는 일입니다. 감싼 경계가 없으면 개발 서버는 화면을 띄우되 오류 글을 찍고, 빌드는 /stats에서 멈춥니다(해 보기).
확인 문제
문제 1. 2절의 Count가 use(recipes)로 기다리는 동안 /stats에 보이는 것은 무엇일까요?
- ① 빈 화면
- ② 머리 '통계'와
세는 중 - ③ 머리 '통계'와
모두 0개
정답
②입니다. 기다리는 동안은 가장 가까운 <Suspense>의 fallback이 보이고, 그 바깥의 머리는 껍데기에 듭니다.
- ① 껍데기는 기다리지 않고 먼저 옵니다.
- ③
use는 풀리기 전의 값을 주지 않습니다. 풀릴 때까지Count가 기다립니다.
문제 2. Count의 props recipes에 맞는 타입은 무엇일까요?
- ①
Promise<Recipe[]> - ②
Recipe[] - ③
() => Recipe[]
정답
①입니다. Page는 getRecipes()가 돌려준 Promise를 기다리지 않고 넘깁니다.
- ② 배열을 넘기려면
Page가 먼저 기다려야 합니다. - ③ 함수는 경계를 넘지 못합니다(경계를 넘는 props).
문제 3. 브라우저 콘솔에 <Count>가 async Client Component라는 오류 글이 찍혔습니다. 고칠 곳은 어디일까요?
- ①
Page를async로 바꾼다 - ②
Count를 감싼<Suspense>를 뺀다 - ③
Count의async를 떼고await대신use로 연다
정답
③입니다. 클라이언트 컴포넌트는 async가 될 수 없어, 받은 Promise를 use로 엽니다.
- ① 오류는 클라이언트 컴포넌트
Count를 가리킵니다. 서버 컴포넌트Page는 그대로 둡니다. - ②
<Suspense>는use가 기다리는 동안fallback을 보이는 자리라 그대로 둡니다.
단원 4를 마쳤습니다. 레시피를 파일에서 읽고, 기다리는 자리를 <Suspense>로 감싸 껍데기를 먼저 보냈습니다. 지금은 요청마다 파일을 다시 읽습니다. 읽은 결과를 기억해 두는 일은 단원 5에서 봅니다.
이 레슨에서 바꾼 파일
components/Count.tsx — 새로 만듦(받은 Promise를 use로 열어 수를 셈)
'use client';
import { use } from 'react';
import type {
Recipe,
} from '@/lib/recipes';
// 1. 기다리는 일을 자식으로
function Count({
recipes,
}: {
recipes: Promise<Recipe[]>;
}) {
// 2. Promise를 넘기고 use로 열기
const list = use(recipes);
return (
<p>모두 {list.length}개</p>
);
}
export default Count;app/stats/page.tsx — getRecipes()의 Promise를 기다리지 않고 Count에 넘기고 <Suspense>로 감쌈
import {
Suspense,
} from 'react';
import Count from
'@/components/Count';
import {
getRecipes,
} from '@/lib/recipes';
export default function Page() {
const recipes = getRecipes();
// 3. 쪽에서 Suspense로 감싸기
return (
<>
<h1>통계</h1>
<Suspense
fallback={<p>세는 중</p>}
>
<Count
recipes={recipes}
/>
</Suspense>
</>
);
}이 단원 끝 파일
data/recipes.json
[
{
"id": "r1",
"title": "김치볶음밥",
"category": "한식",
"minutes": 15,
"ingredients": [
"밥",
"김치",
"달걀"
],
"favorite": true
},
{
"id": "r2",
"title": "토마토 파스타",
"category": "양식",
"minutes": 25,
"ingredients": [
"파스타",
"토마토"
],
"favorite": false
},
{
"id": "r3",
"title": "계란말이",
"category": "한식",
"minutes": 10,
"ingredients": [
"달걀",
"파"
],
"favorite": false
},
{
"id": "r4",
"title": "바나나 팬케이크",
"category": "디저트",
"minutes": 20,
"ingredients": [
"바나나",
"밀가루",
"우유"
],
"favorite": true
}
]
lib/recipes.ts
import {
readFile,
} from 'node:fs/promises';
export interface Recipe {
id: string;
title: string;
category: string;
minutes: number;
ingredients: string[];
favorite: boolean;
}
export const categories = [
'한식',
'양식',
'일식',
'중식',
'디저트',
];
function isRecipe(
v: unknown,
): v is Recipe {
return (
typeof v === 'object' &&
v !== null &&
'id' in v &&
'title' in v &&
'category' in v &&
'minutes' in v &&
'ingredients' in v &&
'favorite' in v &&
typeof v.id === 'string' &&
typeof v.title ===
'string' &&
typeof v.category ===
'string' &&
typeof v.minutes ===
'number' &&
Array.isArray(
v.ingredients,
) &&
typeof v.favorite ===
'boolean'
);
}
export const getRecipes =
async () => {
const text = await readFile(
'data/recipes.json',
'utf8',
);
const data: unknown =
JSON.parse(text);
return Array.isArray(data)
? data.filter(isRecipe)
: [];
};
export const getRecipe =
async (id: string) => {
const list =
await getRecipes();
return list.find(
(r) => r.id === id,
);
};app/recipes/page.tsx
import {
Suspense,
} from 'react';
import Link from 'next/link';
import FavoriteButton from
'@/components/FavoriteButton';
import SearchBar from
'@/components/SearchBar';
import {
getRecipes,
type Recipe,
} from '@/lib/recipes';
const item = (r: Recipe) => (
<li key={r.id}>
<Link
href={`/recipes/${r.id}`}
>
{r.title}
</Link>
<FavoriteButton
recipe={r}
/>
</li>
);
// 1. 기다리는 일을 자식으로
async function RecipeList({
searchParams,
}: {
searchParams: Promise<{
q?: string | string[];
}>;
}) {
// 2. 자식에서 await로 읽기
const { q } =
await searchParams;
const word =
typeof q === 'string'
? q
: '';
const recipes =
await getRecipes();
const found = recipes.filter(
(r) =>
r.title.includes(word),
);
return (
<ul>{found.map(item)}</ul>
);
}
// 3. 쪽에서 Suspense로 감싸기
function Page({
searchParams,
}: PageProps<'/recipes'>) {
return (
<>
<SearchBar />
<Suspense
fallback={
<p>목록을 읽는 중</p>
}
>
<RecipeList
searchParams={
searchParams
}
/>
</Suspense>
</>
);
}
export default Page;app/recipes/[id]/page.tsx
import {
Suspense,
} from 'react';
import {
notFound,
} from 'next/navigation';
import {
getRecipe,
getRecipes,
} from '@/lib/recipes';
import Fold from
'@/components/Fold';
export const
generateStaticParams =
async () => {
const list =
await getRecipes();
return list.map((r) => ({
id: r.id,
}));
};
function Ingredients({
items,
}: {
items: string[];
}) {
return (
<ul>
{items.map((i) => (
<li key={i}>{i}</li>
))}
</ul>
);
}
// 1. 기다리는 일을 자식으로
async function RecipeDetail({
params,
}: {
params: Promise<{
id: string;
}>;
}) {
// 2. 자식에서 await로 읽기
const { id } = await params;
const found =
await getRecipe(id);
if (!found) {
notFound();
}
const items =
found.ingredients;
return (
<>
<h2>{found.title}</h2>
<Fold>
<Ingredients
items={items}
/>
</Fold>
</>
);
}
// 3. 쪽에서 Suspense로 감싸기
function Page({
params,
}: PageProps<'/recipes/[id]'>) {
return (
<Suspense
fallback={
<p>레시피를 읽는 중</p>
}
>
<RecipeDetail
params={params}
/>
</Suspense>
);
}
export default Page;app/page.tsx
import {
Suspense,
} from 'react';
import {
getRecipes,
} from '@/lib/recipes';
const wait = (ms: number) =>
new Promise((r) => {
setTimeout(r, ms);
});
// 2초 걸리는 읽기라고 칩니다
const getPick = async () => {
const recipes =
await getRecipes();
await wait(2000);
return recipes[2];
};
// 1초 걸리는 읽기라고 칩니다
const getFavorites =
async () => {
const recipes =
await getRecipes();
await wait(1000);
return recipes.filter(
(r) => r.favorite,
);
};
// 1. 기다리는 일을 자식으로
async function Pick() {
// 2. 자식에서 await로 읽기
const pick = await getPick();
return (
<p>
오늘의 추천: {pick.title}
</p>
);
}
async function Favorites() {
const list =
await getFavorites();
const text = list
.map((r) => r.title)
.join(', ');
return <p>즐겨찾기: {text}</p>;
}
// 3. 쪽에서 Suspense로 감싸기
export default function Home() {
return (
<>
<h1>레시피 보관함</h1>
<Suspense
fallback={
<p>추천을 고르는 중</p>
}
>
<Pick />
</Suspense>
<Suspense
fallback={
<p>즐겨찾기를 읽는 중</p>
}
>
<Favorites />
</Suspense>
</>
);
}app/recipes/loading.tsx
function Loading() {
return <p>레시피를 여는 중</p>;
}
export default Loading;components/SearchBar.tsx
function SearchBar() {
return (
<form action="/recipes">
<input name="q" />
<button>찾기</button>
</form>
);
}
export default SearchBar;components/Count.tsx
'use client';
import { use } from 'react';
import type {
Recipe,
} from '@/lib/recipes';
// 1. 기다리는 일을 자식으로
function Count({
recipes,
}: {
recipes: Promise<Recipe[]>;
}) {
// 2. Promise를 넘기고 use로 열기
const list = use(recipes);
return (
<p>모두 {list.length}개</p>
);
}
export default Count;app/stats/page.tsx
import {
Suspense,
} from 'react';
import Count from
'@/components/Count';
import {
getRecipes,
} from '@/lib/recipes';
export default function Page() {
const recipes = getRecipes();
// 3. 쪽에서 Suspense로 감싸기
return (
<>
<h1>통계</h1>
<Suspense
fallback={<p>세는 중</p>}
>
<Count
recipes={recipes}
/>
</Suspense>
</>
);
}