-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
fix: update error handling in MatchInner to access error data directly #4746
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
birkskyum
merged 16 commits into
TanStack:main
from
leesb971204:fix/nested-notFound-data
Nov 19, 2025
Merged
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
f907711
fix(router): spread data props in notFoundComponent
leesb971204 a3bdffd
refactor(router-core): change proper NotFoundRouteProps type definition
leesb971204 35ec117
test(react-router): add test verify notFoundRouteProps properly passe…
leesb971204 0b6cccb
docs(react-router): correct type annotation for data in notFoundCompo…
leesb971204 2e28b59
refactor(router-core): enhance NotFoundRouteProps type with generics …
leesb971204 3f98c67
refactor(router-core): simplify NotFoundRouteProps type by removing g…
leesb971204 337c168
test(react-router): improve notFoundComponent tests with type guard f…
leesb971204 0fc4886
docs(router): revert type annotation for data in notFoundComponent
leesb971204 17e1384
docs(router): add NotFoundComponent documentation and update router A…
leesb971204 c2b8ee7
Merge remote-tracking branch 'upstream/main' into fix/nested-notFound…
leesb971204 a29b905
feat(router): add case not-found flow in kitchen sink
leesb971204 b2e4a0e
test(router): add type test for notFoundRouteProps
leesb971204 f7509ba
Merge branch 'main' into fix/nested-notFound-data
leesb971204 6bb69ad
Merge branch 'main' into fix/nested-notFound-data
birkskyum 675eb07
add test to solid-router
birkskyum b0b6c9e
ci: apply automated fixes
autofix-ci[bot] File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
36 changes: 36 additions & 0 deletions
36
docs/router/framework/react/api/router/notFoundComponentComponent.md
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,36 @@ | ||
| --- | ||
| id: notFoundComponentComponent | ||
| title: NotFoundComponent component | ||
| --- | ||
|
|
||
| The `NotFoundComponent` component is a component that renders when a not-found error occurs in a route. | ||
|
|
||
| ## NotFoundComponent props | ||
|
|
||
| The `NotFoundComponent` component accepts the following props: | ||
|
|
||
| ### `props.data` prop | ||
|
|
||
| - Type: `unknown` | ||
| - Optional | ||
| - Custom data that is passed to the `notFoundComponent` when the not-found error is handled | ||
| - This data comes from the `data` property of the `NotFoundError` object | ||
|
|
||
| ### `props.isNotFound` prop | ||
|
|
||
| - Type: `boolean` | ||
| - Required | ||
| - A boolean value indicating whether the current state is a not-found error state | ||
| - This value is always `true` | ||
|
|
||
| ### `props.routeId` prop | ||
|
|
||
| - Type: `RouteIds<RegisteredRouter['routeTree']>` | ||
| - Required | ||
| - The ID of the route that is attempting to handle the not-found error | ||
| - Must be one of the valid route IDs from the router's route tree | ||
|
|
||
| ## NotFoundComponent returns | ||
|
|
||
| - Returns appropriate UI for not-found error situations | ||
| - Typically includes a "page not found" message along with links to go home or navigate to previous pages |
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This part causes the structure to become nested like
data: { data: ... }.