Skip to content
Source
Sign inSign up
TanStack/router

Link component ignore the basepath of LocationProvider #3

Send to my agent
Closedniboc(GitHub profile, opens in a new tab) opened this issue 2 comments

Could it be that you forgot to contemplate it? or maybe I'm missing something to make it work? I tried writing the basepath in all the ways

LocationProvider

<LocationProvider basepath="/subfolder/">
  <App />
</LocationProvider>

Navbar

<nav>
  <Link to="/">Home</Link>
  <Link to="/about-us">About Us</Link>
</nav>

When I click on a link, it goes to the root. The only way to make it work is to write the basepath in the "to" too, but it's not very practical.

Navbar Working

<nav>
  <Link to="/subfolder/">Home</Link>
  <Link to="/subfolder/about-us">About Us</Link>
</nav>

Thanks

  1. This is definitely a big bug. That's supposed to work as you've illustrated. I'll dig in and see what I can find.

    On Mon, Feb 25, 2019 at 7:11 PM Nicolas Bocassi <notifications@github.com> wrote:

    Could it be that you forgot to contemplate it? or maybe I'm missing something to make it work? I tried writing the basepath in all the ways

    LocationProvider

    Navbar

    Home About Us

    When I click on a link, it goes to the root. The only way to make it work is to write the basepath in the "to" too, but it's not very practical.

    Navbar Working

    Home About Us

    Thanks

    — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub <https://github.com/tannerlinsley/react-location/issues/3>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AFUmCU00DlfvEkaePguVp-rXO7saD8UCks5vRKXcgaJpZM4bRQad> .

  2. Should be fixed in latest @next

  3. tannerlinsley closed this

Sign in to join this conversation.