I'm trying to call a Modal I made in another class. I simply want to pass a boolean parameter to open or close it.
Calling the modal:
<CourseModal show={true} />
Modal function:
export default function CourseModal(show) {
return (
<Modal open={show}>
<ModalContent />
</Modal>
);
}
However when I do this, I get the following error:
Why does this happen? It says it expects a boolean, but it clearly is? Thanks in advance!