-
Notifications
You must be signed in to change notification settings - Fork 144
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
✨ [RUM-5500] React-router v7 support #3299
base: main
Are you sure you want to change the base?
Conversation
Bundles Sizes Evolution
🚀 CPU Performance
🧠 Memory Performance
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #3299 +/- ##
==========================================
+ Coverage 93.70% 93.73% +0.03%
==========================================
Files 290 292 +2
Lines 7652 7658 +6
Branches 1745 1743 -2
==========================================
+ Hits 7170 7178 +8
+ Misses 482 480 -2 ☔ View full report in Codecov by Sentry. |
dev,react-router-dom-6,MIT,Copyright (c) React Training LLC 2015-2019 Copyright (c) Remix Software Inc. 2020-2021 Copyright (c) Shopify Inc. 2022-2023 | ||
dev,react-router-dom-7,MIT,Copyright (c) React Training LLC 2015-2019 Copyright (c) Remix Software Inc. 2020-2021 Copyright (c) Shopify Inc. 2022-2023 |
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.
💬 suggestion: We should tweak check-license.js
to take the real package name into account instead of its alias (react-router-dom-6
is not an actual package).
|
||
export const Routes = createRoutesComponent(useRoutes, createRoutesFromChildren) | ||
|
||
export * from '../domain/reactRouter' |
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.
❓ question: Is this needed?
|
||
export const Routes = createRoutesComponent(useRoutes, createRoutesFromChildren) | ||
|
||
export * from '../domain/reactRouter' |
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.
❓ question: Is this needed?
@@ -0,0 +1,14 @@ | |||
export type AnyRouteObject = { path?: string | undefined } |
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.
💬 suggestion: Add a comment at the top of the file to explain those types, like:
// Those types are used by our instrumentation functions to make them work with any react-router
// version we support. We should not import react-router types as we don't know which version
// will be used by the customer.
//
// Those types should be:
// * compatible with all react-router-dom versions we support
// * include the minimal set of attributes used by our instrumentation functions.
Motivation
Add support for react-router v7 for the rum-react plugin.
Changes
Reuse as much as possible the code from react-router-6, adapt unit test instead of cloning them
Testing
I have gone over the contributing documentation.