Replies: 1 comment 1 reply
-
You can import generatePath from |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
In react router there is the
generatePath
method:I would like to use a similar thing based on remix matches to generate URLs to different route params, see image:

Currently I am on the route http://localhost:3000/filiale/e07d4c4e-29df-4d26-8b26-1b50b91e0c1d/suche
From my dropdown component I would like to generate links to other ids, e.g. to http://localhost:3000/filiale/xxx-another-id-xxx/suche.
So basically I just want to switch out the ID and probably other URL parameters and keep the rest as it is.
I was thinking about useMatches here:

Some draft pseudocode to describe what I would like to achieve:
I have scrolled through the docs but did not find if something like that already exists, so I'd like to propose that as a feature. Let me know what you think! :)
Beta Was this translation helpful? Give feedback.
All reactions