Overlay and error boundaries
See original GitHub issueThe overlay is currently hiding components that are meant to caught specific errors (for instance network errors, like 404). While I’ve seen mentioned that error boundaries should be used sparingly anyway, I still find the UX fairly annoying 😕
At the very least, it would be nice if we could manually tag errors as “silences the overlay”, something like:
static getDerivedStateFromError(error: Error) {
// Would set a symbol on the `error` instance that Overlay
// would use to detect when to prevent the overlay
window.preventOverlayOnError(error);
return {error};
}
Issue Analytics
- State:
- Created 3 years ago
- Reactions:9
- Comments:6 (1 by maintainers)
Top Results From Across the Web
Handling JavaScript errors in React with error boundaries
js have an error overlay component that blocks the UI whenever there is an error, overshadowing your own error boundaries. In create-react-app, ...
Read more >create react app - Disable error overlay in development mode
We feel the error overlay provides tremendous value over your typical error boundary (source code, click to open, etc). It is also vital...
Read more >Use react-error-boundary to handle errors in React
Oh, one other thing. Right now, you may notice that you'll experience that error overlay even if the error was handled by your...
Read more >React Error Boundaries: Complete Guide - Meticulous
(The CodeSandbox might display a development error overlay that only shows in development, you can dismiss it to see the rendering result).
Read more >react-app-error-boundary - npm
Allows you to turn react-error-overlay in your react-app from a mandatory-thing-you-never-asked-for into a handy-opt-in-feature. Inspired by ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I really think we need a
preventOverlay
or similar here.Ok… I just discovered that this can be disabled like so:
new ReactRefreshWebpackPlugin({ overlay: false })
This was not apparent on the main NPM package page and is buried here - https://github.com/pmmmwh/react-refresh-webpack-plugin/blob/HEAD/docs/API.md