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.

Have `navigate` respect the basePath like `Link` does

See original GitHub issue

Thanks for writing this library. I started with hookrouter and hit https://github.com/Paratron/hookrouter/issues/70 and saw your link to this repo.

I was wondering if it was possible (either by default behaviour or via a flag) to have navigate respect the basePath it is inside the same way that Link does, so I can use paths relative to the basePath rather than the server root?

So navigate('/bar') would end up going to /foo/bar when used inside a route with a base path of /foo

Thanks

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
kyeoticcommented, Sep 12, 2019

Ok, that is something I should have anyway, its missing from the current API (I actually thought it was there and realized it wasn’t when I tried to get a link for you 😭 ). I will add that tomorrow morning.

0reactions
kyeoticcommented, Sep 13, 2019

@micmcg I published that under 0.4.0

Read more comments on GitHub >

github_iconTop Results From Across the Web

Link/navigate does not obey Router basepath #78 - GitHub
The issue is with navigate . I don't see any reason why an app would want to change history outside of where it...
Read more >
Why base tag does not work for relative paths? - Stack Overflow
Although paths starting with / are absolute, URLs containing such paths are actually called relative URLs. According to the specification, you ...
Read more >
Dealing with Application Base URLs and Razor link ...
In the case of DasBlog, we have a configuration setting so that the app knows where it LOOKS like it is, from the...
Read more >
How to use URLs and links in Jekyll - Made Mistakes
How Jekyll uses URLs and how to link posts, pages, assets, and other resources together.
Read more >
The router Property - Nuxt
The router property. The router property lets you customize Nuxt router. (vue-router ). base. Type: String; Default: '/'. The base URL of the...
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