Skip to content

Commit

Permalink
fix: index route no longer required
Browse files Browse the repository at this point in the history
  • Loading branch information
tannerlinsley committed Nov 18, 2022
1 parent 4d0e5d7 commit 32b76d1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions examples/react/basic/src/main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import {
createRouteConfig,
Link,
useMatch,
RegisteredRouter,
} from '@tanstack/react-router'
import { TanStackRouterDevtools } from '@tanstack/react-router-devtools'

Expand Down Expand Up @@ -53,7 +52,7 @@ const postRoute = postsRoute.createRoute({
})

const routeConfig = createRouteConfig().addChildren([
indexRoute,
// indexRoute,
postsRoute.addChildren([PostsIndexRoute, postRoute]),
])

Expand Down
2 changes: 1 addition & 1 deletion packages/react-router/src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,7 @@ export function createReactRouter<
},
}

const routeExt = makeRouteExt(router.getRoute('/'), router)
const routeExt = makeRouteExt(router.getRoute(rootRouteId), router)

Object.assign(router, routerExt, routeExt)
},
Expand Down

0 comments on commit 32b76d1

Please sign in to comment.