Containment (component inside a component)

functional components are defined like so:

After importing it, you can call the component like in this example:

Some components don’t know their children ahead of time.

We recommend that such components use the special children prop to pass children elements directly into their output:

This lets other components pass arbitrary children to them by nesting the JSX:

Furthermore, you can use property extraction by using prop as an object and declaring the property that we’re looking for: