For functional components, we need to use the FunctionComponent generic type to access children. Check out the example
we had earlier:

importReact,{FunctionComponent}from'react';typeCardProps={title:string,paragraph:string}// we can use children even though we haven't defined them in our CardPropsexportconstCard:FunctionComponent<CardProps>=({title,paragraph,children})=><aside><h2>{title}</h2>
<p>{paragraph}</p>
{children}</aside>

Note that we use destructring here to access our properties directly. You have to be
explicit that you want to access children as well. If you don’t use destructuring, the
code looks like this:

importReact,{FunctionComponent}from'react';// no children defined heretypeCardProps={title:string,paragraph:string}// undestructuredexportconstCard:FunctionComponent<CardProps>=(props)=><aside><h2>{props.title}</h2>
<p>{props.paragraph}</p>
{/* still in our props */}{props.children}</aside>