Skip to content

[Docs]: Question about this tutorial: https://reactrouter.com/en/main/start/tutorial #11208

Closed Answered by brophdawg11
rebeccapeltz asked this question in Q&A
Discussion options

You must be logged in to vote

I think the issue is where you are configuring the basename. It looks like it's part of your route definition, but it should be in the second option to createBrowserRouter. Does the following work?

const router = createBrowserRouter([
  {
    path: "/",
    element: <Root />,
    errorElement: <ErrorPage />,
  },
], {
    basename: "/react-router-tutorial",
});

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@rebeccapeltz
Comment options

@brophdawg11
Comment options

Answer selected by brophdawg11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
2 participants
Converted from issue

This discussion was converted from issue #11204 on January 19, 2024 18:21.