Skip to content
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(react): React Router v7 support (library) #14513

Merged
merged 13 commits into from
Nov 29, 2024
Merged

Conversation

chargome
Copy link
Member

@chargome chargome commented Nov 27, 2024

This PR basically handles the library part of rr7, not the framework part.

Since v7 is v6 compatible we just adapt and re-export existing functions from v6.

  • Moves all shared code between v6 and v7 to a reactrouterv6-compat-utils.tsx file
  • Updates v6 exports to use these utils
  • Deprecates some of the v6 exports since the naming would be misleading for v7
  • Adds v7 exports to use these utils
  • Adds a v7 e2e test that basically has the same tests as rr6, but with a vite config

closes #14518

@chargome chargome self-assigned this Nov 27, 2024
@chargome
Copy link
Member Author

@lforst this pr contains some deprecations for react router v6 exports, should we include this in the v9 roadmap?

@chargome chargome marked this pull request as ready for review November 28, 2024 10:19
Copy link
Collaborator

@onurtemizkan onurtemizkan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me! Only need to double check if we need to update the vendored types for RR v7, they're pretty much loosened anyways, but still worth checking IMO.

@chargome chargome changed the title feat(react): React Router v7 support feat(react): React Router v7 support (library) Nov 28, 2024
@chargome chargome mentioned this pull request Nov 28, 2024
2 tasks
@fobos531
Copy link

hey @chargome - are there any additional changes required on Sentry's part to support the framework flow? I'm interested in knowing more details about this as I've just migrated from Remix to RR7 so naturally I'm using it as a framework.

@chargome
Copy link
Member Author

@fobos531 we have a separate tracking issue for that here.

This PR is only for supporting rr7 in library mode

@chargome chargome merged commit af773b1 into develop Nov 29, 2024
130 checks passed
@chargome chargome deleted the cg/react-router-v7 branch November 29, 2024 13:20
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.

Support React Router v7 (library)
4 participants