User 컴포넌트는 title이라는 일반 문자열 속성과 <p> 요소 3개로 구성된 children을 함께 전달받습니다. 따라서 User 컴포넌트에서는 두 값을 모두 받을 수 있도록 props 타입을 다음과 같이 설정합니다. 즉, User 컴포넌트에서는 title 속성과 children 속성을 함께 props로 받아 처리하면 됩니다.
src/components/User.tsx
export default function User({
title,
children,
}: {
title: string;
children: React.ReactNode;
}) {
return (
<>
<h1>{title}</h1>
{children}
</>
);
}