React: adding props to an existing component

You need to clone the element and add the additional props using React.cloneElement e.g:

const ClonedElementWithMoreProps = React.cloneElement(
  this.mainContent, 
  { anotherMessage: "nice to meet ya!" }
);
// now render the new cloned element?

Leave a Comment