Reading Class 21 - meron-401n14/seattle-javascript-401n14 GitHub Wiki

What this.props.children does?

It is used to display whatever you include between the opening and closing tags when invoking a component.

Example :

Here’s an example of a stateless function that is used to create a component, since this is a stateless function, there is no ‘this’ keyword so just use props.children.

const Picture = (props) => { return ( <div> <img src={props.src}/> {props.children} </div> ) }

⚠️ **GitHub.com Fallback** ⚠️