File tree Expand file tree Collapse file tree 1 file changed +17
-17
lines changed
docs/router/framework/react Expand file tree Collapse file tree 1 file changed +17
-17
lines changed Original file line number Diff line number Diff line change @@ -76,23 +76,23 @@ Create the following files:
76
76
import { createRootRoute , Link , Outlet } from ' @tanstack/react-router'
77
77
import { TanStackRouterDevtools } from ' @tanstack/react-router-devtools'
78
78
79
- export const Route = createRootRoute ({
80
- component : () => (
81
- <>
82
- <div className = " p-2 flex gap-2 " >
83
- < Link to = " / " className = " [&.active]:font-bold " >
84
- Home
85
- </ Link > { ' ' }
86
- < Link to = " /about " className = " [&.active]:font-bold " >
87
- About
88
- </ Link >
89
- </ div >
90
- < hr />
91
- < Outlet />
92
- < TanStackRouterDevtools />
93
- </>
94
- ),
95
- })
79
+ const RootLayout = () => (
80
+ <>
81
+ <div className = " p-2 flex gap-2 " >
82
+ <Link to = " / " className = " [&.active]:font-bold " >
83
+ Home
84
+ </ Link > { ' ' }
85
+ < Link to = " /about " className = " [&.active]:font-bold " >
86
+ About
87
+ </ Link >
88
+ </ div >
89
+ < hr / >
90
+ < Outlet />
91
+ < TanStackRouterDevtools />
92
+ < />
93
+ )
94
+
95
+ export const Route = createRootRoute ({ component: RootLayout });
96
96
```
97
97
98
98
#### ` src/routes/index.tsx `
You can’t perform that action at this time.
0 commit comments