1var clonedElementWithMoreProps = React.cloneElement(
2 this.mainContent,
3 { anotherMessage: "nice to meet ya!" }
4);
5// now render the new cloned element? //Deep Copy
6
1function AddExtraProps(Component, extraProps) {
2 return <Component.type {...Component.props} {...extraProps} />;
3}
4