TypeScript에서는 Props의 타입을 컴포넌트에게 알려주어야 한다. 이때 children이 넘어온다면 아래와 같이 정의할 수 있다.
type Props = { children: React.ReactNode; } export default function Example({children}: Props){ return ( <div>{children}</div> ) }