-
-
Notifications
You must be signed in to change notification settings - Fork 10.8k
fix(react-router/router): properly escape :param values in generatePath()
#13530
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
Conversation
🦋 Changeset detectedLatest commit: 50aedcc The changes in this PR will be included in the next version bump. This PR includes changesets to release 11 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
🤖 Hello there, We just published version Thanks! |
:param values in generatePath()
|
🤖 Hello there, We just published version Thanks! |
It was introduced to work around React Router v6's issue of not encoding parameters in the generatePath function. However, after migrating to v7, tests began failing due to double encoding. This revealed that React Router v7 already handles encoding parameters in generatePath. See remix-run/react-router#13530 Thus, this commit reverts the changes made in #2576
## Problem React Router v7 was released almost a year now (see https://reactrouter.com/changelog#v700), but it has not been updated in Agama yet. In addition to the obvious benefit of keeping dependencies up-to-date, updating it might help to address some limitations we have found with the v6 version, like 06d858c ## Solution Migrate React Router dependency to its latest version. ## Testing - Adapted existing tests. ## Notes This migration has been straightforward, and as of now, Agama is using Data Mode (see https://reactrouter.com/start/modes). However, this could change in the future if we find advantages in switching to Declarative or Framework Mode. Before making any decisions, we’ll need to work on `src/App.tsx` along with the changes planned for the api-v2 branch that this PR is based on. ## Documentation * https://reactrouter.com/upgrading/v6 * remix-run/react-router#12363 (comment) * remix-run/react-router#13530 (`generatePath` now encodes URL params by default, related to #2576) * https://www.typescriptlang.org/tsconfig/#moduleResolution
Fixes #11940