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

Make relative transition paths work #135

Closed
saikat opened this issue Nov 12, 2015 · 8 comments
Closed

Make relative transition paths work #135

saikat opened this issue Nov 12, 2015 · 8 comments

Comments

@saikat
Copy link

saikat commented Nov 12, 2015

I saw the issue here remix-run/react-router#1828 and it was closed to continue discussion in this repo. Apologies if this is a dupe or has already been implemented, but I could not find it anywhere.

@taion
Copy link
Contributor

taion commented Nov 12, 2015

Thanks!

Note that this is slightly different from remix-run/react-router#2172, which I expect to have somewhat different semantics that instead tie into specifics of the router.

I'm not sure where the priority on this one sits, though - a naive implementation of relative transition paths opens a whole can of worms with how the router currently is entirely indifferent to trailing slashes.

@yanivtal
Copy link

yanivtal commented Dec 8, 2015

I'm surprised more people aren't asking for this. It's awfully leaky to have components aware of their absolute paths. Are there other workarounds I'm unaware of or is everyone tightly coupling their routes like an exoskeleton that can never change?

@taion
Copy link
Contributor

taion commented Dec 8, 2015

Don't they already sort of work when using createBrowserHistory? I don't know that we'll meaningfully resolve this before we figure out the appropriate semantics on the router side, and those are non-trivial.

@yanivtal
Copy link

yanivtal commented Dec 8, 2015

Thanks for the update. I did some more experimentation and I'm getting some weird behavior. When I'm on /base-route and i call history.push('subpath'), the URL updates to /base-route/subpath but nothing happens and I get an error saying 'subpath' doesn't match any routes. Then, if I refresh the page, the route loads properly..

@taion
Copy link
Contributor

taion commented Dec 8, 2015

I never said the router supported it.

@yanivtal
Copy link

yanivtal commented Dec 8, 2015

Ahh just weird because they punted here in remix-run/react-router#1828 (comment). Guess work's for them?

@taion
Copy link
Contributor

taion commented Dec 8, 2015

Router discussion is on remix-run/react-router#2172. There's really a number of complexities here.

@yanivtal
Copy link

yanivtal commented Dec 8, 2015

Cool thanks for the right link!

@mjackson mjackson mentioned this issue Mar 9, 2016
@lock lock bot locked as resolved and limited conversation to collaborators Jun 5, 2018
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

3 participants