Skip to content
Source
Sign inSign up
TanStack/router

[Docs] API definitions and examples for 'createRouteConfig' #467

Mergedsaurabhan(GitHub profile, opens in a new tab)merged 8 commits intobeta fromrefs/pull/467/headmerged by tannerlinsley

Showing 5 changed files with 138 additions and 1 deletion (loading 1).

x
0 of 5 viewed, 5 left
8 additions and 1 deletiondocs/api/react/createReactRouter.mdModified
View file
@@ -3,11 +3,18 @@
title: createReactRouter
---
​
+use the 'createReactRouter' to create a router to provide it to the Router Provider, 'createReactRouter' takes in routes config in the options.
+​
```tsx
import { createReactRouter } from '@tanstack/react-router'
​
-const router = createReactRouter({
+const routeConfig = rootRoute.addChildren([
+ indexRoute,
+])
​
+const router = createReactRouter({
+ routeConfig,
+ //add other options here
})
```
​
126 additions and 0 deletionsdocs/api/react/createRouteConfig.mdModified
View file
@@ -3,15 +3,141 @@