-
Notifications
You must be signed in to change notification settings - Fork 307
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
feat: upgrade react-router to v6 in dashboard #3007
Conversation
packages/dashboard/src/components/DashboardFrame/Navigation.tsx
Outdated
Show resolved
Hide resolved
const renderLink = useMemo( | ||
() => | ||
forwardRef<HTMLAnchorElement | null, Omit<LinkProps, 'to'>>((linkProps, ref) => ( | ||
<Link to={to} ref={ref} {...linkProps} /> | ||
)), | ||
[to], |
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.
Hmm this part is strange to me... Why not define a new Link
that internally renames component
props (from mui) to as
props (to react-route)?
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.
Link does not have as
props in v6
It looks like react-router doesn't support |
reopened but converted to draft. |
Will you continue on this before we have more routes? @nuanyang233 |
hmm, it looks like react-router doesn't solve the previously mentioned problem. I'll keep trying to replace it. |
Sorry, I re-tested and the problem is not that However, Material-UI provides But they missing export it in version 36... mui/material-ui#26660 maybe we need to wait for version 38. 😂 cc @Jack-Works |
We have |
add7a93
to
02eb77e
Compare
@nuanyang233 I see the patch file is a little big. Is all that content necessary? Is it possible to do via a smaller (minimal) patch? That will be easier when we're going to upgrade. |
closes #2989