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
Is there a way to bypass the base
of the Router in a Link?
#431
Comments
Hi @jeerbl, could you share a piece of code? This is supposed to work. |
Hi @molefrog, I made a CodeSandbox. I've actually seen something strange, looking deeper into the problem. What I'm trying to do is to have the same component in two different contexts, go to the same URL, and Wouter actually does, but the In that example, if you access First thing is, what should happen here in my opinion is to have the Second thing is, should Wouter actually ignore the |
That's because you have a custom hrefs formatter, if you remove it you the href will be |
The |
I see, thank you. So just formatting and nothing else. Closing this. |
Actually reopening this for advice. I updated the CodeSandbox. Here, in this new piece of code, the component My question is—if I want the I would want all links under the |
Just use |
Hi @jeerbl is this issue still relevant? |
Hi @molefrog, actually it isn't! Closing this issue :) |
I tried
<Link href="~/path">...</Link>
but the~
does not seem to bypass thebase
of the router. On top of that, when specifying anHrefFormatter
to the router to bypass manually in the Router configuration, the~
character is not included in thelink
.Is there any other way to achieve this? Let me know if this need more clarification.
Jérôme
The text was updated successfully, but these errors were encountered: