This allows you to put children elements directly in the output:
import React from 'react';
function ContainmentComponent(props){
return (
<div style={{border:"1px green solid", padding: '10px'}}>
{props.children}
</div>
)
}
export default ContainmentComponent;
//use
<ContainmentComponent >
stuff
</ContainmentComponent>
Leave a Reply