How to fix this warning in console of a React app using the react-modal package:
Warning: react-modal: App element is not defined. Please use
Moda
If getting the Warning: react-modal: App element is not defined...
error when running tests (we were running Jest), you can suppress the warnings by adding the following to your test file:
import ReactModal from 'react-modal';
ReactModal.setAppElement('*'); // suppresses modal-related test warnings.