question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Redirect with matched parameters doesn't work

See original GitHub issue

Version

4.2.0

Test Case

https://codesandbox.io/s/p51on3mxlx

Steps to reproduce

Something like this <Redirect from="/topics/:id" to="/topic/:id" />

Expected Behavior

Redirect from like /topics/1 to /topic/1 as it is described in official docs: https://reacttraining.com/react-router/web/api/Redirect/from-string

Actual Behavior

Ignoring matched params and redirecting from /topics/1 to /topic/:id

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:8 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
timdorrcommented, May 23, 2018

I’ll be putting out a release very soon.

2reactions
timdorrcommented, Mar 1, 2018

This isn’t released yet. But soon!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Redirect with matched parameters with react-router-dom ...
A <Redirect> doesn't do any pattern compiling. You have to give it the actual URI that you want to redirect to.
Read more >
Redirect with matched parameters doesn't work · Issue #5983
Redirect with matched parameters doesn't work #5983 ... Ignoring matched params and redirecting from /topics/1 to /topic/:id.
Read more >
Redirect - Reach Router
Redirect. Redirects from one path to another. Use this when you want to change a URL without breaking links to the old path....
Read more >
Redirect with matched parameters with react-router-dom ...
Coding example for the question Redirect with matched parameters with react-router-dom doesn't work-Reactjs.
Read more >
HTTP route components (proto)
Route) The list of routes that will be matched and run, in order. The first route that matches ... RouteMatch, REQUIRED) Route matching...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found