T
TanStack3y ago
like-gold

bug when using basepath?

I have this: <RouterProvider router={router} basepath=“app” history={history} /> Where history is a custom tanstack brwserhistory instance. Every time I do <Navigate to=“/some/path” /> It appends an extra “app” to my url, so If I am at localhost:3000/app/home and Navigate runs it will take me to localhost:300/app/app/some/path. Is this a bug with basepath?
1 Reply
ratty-blush
ratty-blush3y ago
Maybe try removing the leading / so <Navigate to=“some/path” />

Did you find this page helpful?