Open History to see the last commit
1import { Link, Outlet, createRootRoute } from '@tanstack/react-router'
2import { TanStackRouterDevtools } from '@tanstack/react-router-devtools'
3β
4export const Route = createRootRoute({
5 component: RootComponent,
6})
7β
8function RootComponent() {
9 return (
10 <>
11 <div className="p-2 flex gap-2 text-lg">
12 <Link
13 to="/"
14 activeProps={{
15 className: 'font-bold',
16 }}
17 activeOptions={{ exact: true }}
18 >
19 Home
20 </Link>{' '}
21 <Link
22 to="/about"
23 activeProps={{
24 className: 'font-bold',
25 }}
26 >
27 About
28 </Link>
29 </div>
30 <hr />
31 <Outlet />
32 <TanStackRouterDevtools position="bottom-right" />
33 </>
34 )
35}