-
Notifications
You must be signed in to change notification settings - Fork 5.5k
refactor: Migrate <Routes /> into a TypeScript functional component
#33276
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
DDDDDanica
merged 27 commits into
main
from
chore/react-router-v6/250515-convert-Routes-to-function-component
Aug 13, 2025
Merged
Changes from 1 commit
Commits
Show all changes
27 commits
Select commit
Hold shift + click to select a range
1f91b8c
Convert target files to typescript
MajorLift 7b1bb31
Remove HOC container for `Routes`
MajorLift f470f09
Fix selectors
MajorLift d3a96f3
Convert `<Routes />` to functional component
MajorLift b2ddb91
Fix dispatch callbacks
MajorLift 1c53c97
consolidate feature flag branch for `isLoadingShown` definition
MajorLift 21e68fe
Use `component` prop for `Route` instances
MajorLift 61733a0
Handle undefined case for `openExtensionInBrowser`
MajorLift 5d38733
Add `component` to proptypes of `Route` wrapper components
MajorLift 2b9015b
Restore `exact` props to routes
MajorLift d6e3bc0
undefined case handling for `getSelectedAccountTokensAcrossChains`
MajorLift 7231ab7
Fix wrong path for `CreateAccountPage`
MajorLift 831c40b
Better comments
MajorLift 6134411
Fix incorrect selector output destructuring
MajorLift b1a9e0f
Merge branch 'main' into chore/react-router-v6/250515-convert-Routes-…
MajorLift 2dd9d4f
Revert changes to selectors
MajorLift 10aee98
Revert "Revert changes to selectors"
MajorLift 5f2e795
Add effect cleanup for `history.listen` call
MajorLift c867278
Prevent `openExtensionInBrowser` from triggering on unrelated deps ch…
MajorLift 29b0b66
minimize re-renders by splitting `useEffect` calls by deps
MajorLift 6dbf846
Remove unused variable
MajorLift 2c740d2
Revert change to `getSelectedAccountTokensAcrossChains` behavior and …
MajorLift 2da9b28
Restore destructuring undefined handling
MajorLift aeeb1c6
Restore early exit to `getSelectedAccountTokensAcrossChains` but retu…
MajorLift c1be73a
Consolidate duplicated types for default export modules
MajorLift 765e46a
Add TODOs to fix named exports cast as default exports
MajorLift 2864c6e
Move `useAppSelector` to `ui/store/store.ts`
MajorLift 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
Use
component prop for Route instances
- Loading branch information
commit 21e68fe58fef520f1ad999b0cd39637fd4966afe
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
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
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.
Uh oh!
There was an error while loading. Please reload this page.
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.
Do we want to change this to a v6
<Routes>here, or do it in another PR?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.
Hmmm good point. A separate PR is more reviewable, but I agree that there's no point in putting the v6 migration off for too long. I'll create a branch off of this one to get it started and open a PR. Absent any blockers, we could merge these back-to-back.
Uh oh!
There was an error while loading. Please reload this page.
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.
Follow-up PR for migration to
react-routerv6 APIs/patterns created here: #35030