Using shouldCloseOnOverlayClick
When shouldCloseOnOverlayClick
is true
(default value for this property),
it requires the onRequestClose
to be defined in order to close the react-modal
doesn't store the isOpen
on its state (only for the internal portal
(see ModalPortal.js).