Children and Composition
The special children prop holds whatever is placed between the tags. It lets you build wrappers such as cards and layouts.
Example
function Card({ title, children }) {
return (
<section>
<h3>{title}</h3>
{children}
</section>
);
}
<Card title="News"><p>Hello</p></Card>Exercise
The special prop name.
function Card({ })
Quiz Test
These free lessons are for learning. Join a full course for projects, mentor feedback and a verified certificate.