How to add additional props to a React element passed in as a prop?
Pass in the component constructor instead of an instance: class Menu extends React.Component { render() { return( <div className=”Menu”> <MenuItem icon={MdInbox} /> <MenuItem icon={MdDrafts} /> <MenuItem icon={MdTrash} /> </div> ); } } The child class: class MenuItem extends React.Component { render() { // This constant must begin with a capital, // it’s how React distinguishes … Read more