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