0
Fork 0
mirror of https://github.com/TanStack/router.git synced 2026-11-16 19:38:07 +00:00
router/docs/api/react/createReactRouter.md
Tanner Linsley 894c47fe92 checkpoint
2023-01-24 12:22:10 -07:00

541 B

id title
ReactRouter ReactRouter

use the 'ReactRouter' to create a router to provide it to the Router Provider, 'ReactRouter' takes in routes config in the options.

import { ReactRouter } from '@tanstack/react-router'

const routeConfig = rootRoute.addChildren([indexRoute])

const router = new ReactRouter({
  routeConfig,
  //add other options here
})

Options

  • options: RouterOptions<TRouteConfig, TRouterContext>
    • Required

Returns

  • router: Router<TRouteConfig, TRoutesInfo, TRouterContext>