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:
7676import { createRootRoute , Link , Outlet } from ' @tanstack/react-router'
7777import { TanStackRouterDevtools } from ' @tanstack/react-router-devtools'
7878
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 });
9696```
9797
9898#### ` src/routes/index.tsx `
You can’t perform that action at this time.
0 commit comments