You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using webpack-dev-server in a React project, when a React component throws an error and that error is caught by a React error boundary component, the webpack-dev-server client overlay is still shown, despite the fact the error was caught by the error boundary component.
This makes it difficult to test error handling functionality in development, because the overlay always gets in the way of seeing the error boundary.
This is a longstanding issue with React and it doesn't seem like it will be addressed anytime soon. For this reason I would like to suggest that we apply the workaround mentioned here so the overlay won't be shown when we detect an error that was caught by an error boundary.
Bug report
When using webpack-dev-server in a React project, when a React component throws an error and that error is caught by a React error boundary component, the webpack-dev-server client overlay is still shown, despite the fact the error was caught by the error boundary component.
This makes it difficult to test error handling functionality in development, because the overlay always gets in the way of seeing the error boundary.
This is due a bug in React where caught errors still bubble up to the uncaught error handler. See facebook/react#19613 and facebook/react#10474.
This is a longstanding issue with React and it doesn't seem like it will be addressed anytime soon. For this reason I would like to suggest that we apply the workaround mentioned here so the overlay won't be shown when we detect an error that was caught by an error boundary.
How Do We Reproduce?
Reduced test case https://github.com/OliverJAsh/react-error-boundary-uncaught-issue/tree/webpack-dev-server
Branch:
webpack-dev-server
Please paste the results of
npx webpack-cli info
here, and mention other relevant informationThe text was updated successfully, but these errors were encountered: