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

Broken relative path in v3 // More docs/examples for relative paths in v4 #4488

Closed
jzaefferer opened this issue Feb 8, 2017 · 1 comment
Closed

Comments

@jzaefferer
Copy link

Through #2172 I ended up on https://reacttraining.com/react-router/examples/recursive-paths

I have two issues with that page: It doesn't explain anything (there's only the example), and it doesn't provide a solution for the kind of relative paths I'm looking for.

I'm currently using the latest stable release (3.0.2) and trying to link to routes using relative paths like this:

<Link to={`../configure/${product.key}`}>

The generated href is correct, but when clicking this link, the route doesn't match, and I end up on our 404 page. Whats really weird: Using the browsers back and forward button, I can go back to the same URL, and now the correct route matches.

Now I understand that v3 isn't being developed, and I have to migrate to v4 beta to get this working. Since v4 looks completely different, and the canonical example for relative paths doesn't use the type I need, I'm pretty lost.

If bugs are being fixed in v3, I can try to put together a reduced test case. Otherwise some pointers for v4 would be great. Are there official docs for migrating from v3? this and this looks useful, but I can't tell if they're still correct/relevant.

@pshrmn
Copy link
Contributor

pshrmn commented Feb 8, 2017

v3 does not support relative URLs for navigation.

In v4, there is work being done to support relative paths, but it is not yet included. When it is, it will include supporting double dot notation paths.

There should be an official upgrade guide closer to the full release.

@pshrmn pshrmn closed this as completed Feb 8, 2017
@lock lock bot locked as resolved and limited conversation to collaborators Jan 20, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants