I am creating a react functional component in which I want to display an icon.
function Item(props) {
return ({props.icon});
}
and I display it like this -
<Item icon={<FaIcon />} />
Is there a way to pass in props to the icon from the Item component?
Something like this -
function Item(props) {
return ({props.icon(props: {})});
}