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
![Composition in React JS - Example Composition in React JS - Example](https://smartcodehelper.com/wp-content/uploads/2022/06/image-5.png)
Result:
![Composition in React JS - Example Composition in React JS - Example](https://smartcodehelper.com/wp-content/uploads/2022/06/image-7.png)
Example of composition in React JS App. Adding children for a React component. Rendering component children using props.children in react.
Result: