Rename ErrorFallback to CustomErrorBoundary#95423
Open
theyoungwolf-dev wants to merge 1 commit into
Open
Conversation
The Custom Error boundary component is named ErrorFallback whereas the usage refers to it as ErrorBoundary (causing confusion). Name them all consistently to CustomErrorBoundary, same as the filename custom-error-boundary
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
For Contributors
Improving Documentation
pnpm prettier-fixto fix formatting issues before opening the PR.What?
Renames the example component in the "Handling uncaught exceptions" section of the Error Handling doc (
app/getting-started/error-handling.mdx) fromErrorFallbacktoCustomErrorBoundaryfor consistency.Why?
The component passed to
unstable_catchErroris defined asErrorFallback, but immediately imported and used under a different name,ErrorBoundary, in the following example:While this is valid code since the default export can be imported under any local name, but having two different names for the same component in adjacent code samples is confusing for readers trying to follow the example, especially since the file is named
custom-error-boundary.tsx. This PR uses one consistent name,CustomErrorBoundary, matching the filename, throughout both the definition and usage examples.How?
Renamed
ErrorFallback→CustomErrorBoundaryin both the.tsxand.jsxcode blocks, and updated the import/usage in the followingsome-componentexamples to match. No behavioral or API changes.Closes NEXT-
Fixes #