-
Notifications
You must be signed in to change notification settings - Fork 27.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: remove dead code from ReactDevOverlay (#74702)
### What? Removes unused props and simplifies the error boundary implementation in the React Dev Overlay component. ### Why? The overlay had unnecessary complexity with unused props like `preventDisplay` and `globalOverlay` that weren't providing value. Simplifying the implementation makes the code more maintainable and easier to understand. ### How? - Removed `preventDisplay` and `globalOverlay` props from ReactDevOverlay - Simplified ErrorBoundary component by removing global overlay handling - Updated type definitions for ErrorDebug component - Cleaned up error display logic in hooks - Updated tests to reflect new component structure
- Loading branch information
Showing
8 changed files
with
90 additions
and
137 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 5 additions & 1 deletion
6
packages/next/src/client/components/react-dev-overlay/pages/ReactDevOverlay.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,10 @@ | ||
import OldReactDevOverlay from './OldReactDevOverlay' | ||
import NewReactDevOverlay from '../_experimental/pages/ReactDevOverlay' | ||
|
||
export default Boolean(process.env.__NEXT_EXPERIMENTAL_NEW_DEV_OVERLAY) | ||
const ReactDevOverlay = Boolean(process.env.__NEXT_EXPERIMENTAL_NEW_DEV_OVERLAY) | ||
? NewReactDevOverlay | ||
: OldReactDevOverlay | ||
|
||
export type ReactDevOverlayType = typeof ReactDevOverlay | ||
|
||
export default ReactDevOverlay |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.