Example of composition in React JS App. Adding children for a React component. Rendering component children using props.children in react.
Use of props.children in React JS

Result:

Example of composition in React JS App. Adding children for a React component. Rendering component children using props.children in react.
Result: