Skip to content

Switch to React Router v7 from Reach Router v1 #162

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
merged 9 commits into from
Jan 3, 2025

Conversation

smilkuri
Copy link
Contributor

@smilkuri smilkuri commented Jan 3, 2025

Issue

Fixes #26

Description

This PR migrates the application from Reach Router v1 to React Router v7

  • Replaced @reach/router with react-router-dom.
  • Updated routing structure from <Router> (Reach Router) to <Routes> (React Router).
  • Switched navigate() to useNavigate().
  • Updated dynamic route handling (path="/:param").
  • Removed RouteComponentProps and used useParams() where necessary.

Testing

Local

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@smilkuri smilkuri requested a review from a team as a code owner January 3, 2025 16:42
Copy link

socket-security bot commented Jan 3, 2025

New and removed dependencies detected. Learn more about Socket for GitHub ↗︎

Package New capabilities Transitives Size Publisher
npm/[email protected] None +5 2.4 MB chancestrickland, mjackson, timdorr

🚮 Removed packages: npm/@reach/[email protected], npm/@types/[email protected]

View full report↗︎

@smilkuri smilkuri changed the title Upgrading from React Router v7 from Reach Router v1 Upgrading to React Router v7 from Reach Router v1 Jan 3, 2025
@smilkuri smilkuri changed the title Upgrading to React Router v7 from Reach Router v1 Switch to React Router v7 from Reach Router v1 Jan 3, 2025
@smilkuri smilkuri merged commit 5b49a99 into aws-samples:main Jan 3, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Switch to React Router once v7 is released
3 participants