We can use function component inside a class component, is it possible to do the other way around? For example
class MyClassComponent extends React.Component {
render() {
return (
<p>This is a class component with display {this.props.display}</p>
)
}
}
const MyFunctionComponent = (props) => {
return <MyClassComponent display=props.shouldDisplay>This is a function component</MyClassComponent >
}