A tiny library to disable annoying the create-react-app's errors' overlay. Do not use it in production mode!
-
Install a package
npm i disable-react-error-overlay -D
oryarn add disable-react-error-overlay -D
. -
Inside your
src/index.js
file use this BEFORE anyReactDOM.render
if (process.env.NODE_ENV === 'development') {
import("disable-react-error-overlay").then(() => {
const iframe = document.querySelector('iframe');
if (iframe) iframe.remove();
});
}