MCPcopy Create free account
hub / github.com/TanStack/router / RootComponent

Function RootComponent

examples/solid/basic-solid-query/src/main.tsx:39–85  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

37})
38
39function RootComponent() {
40 return (
41 <>
42 <HeadContent />
43 <div class="p-2 flex gap-2 text-lg">
44 <Link
45 to="/"
46 activeProps={{
47 class: 'font-bold',
48 }}
49 activeOptions={{ exact: true }}
50 >
51 Home
52 </Link>{' '}
53 <Link
54 to="/posts"
55 activeProps={{
56 class: 'font-bold',
57 }}
58 >
59 Posts
60 </Link>{' '}
61 <Link
62 to="/route-a"
63 activeProps={{
64 class: 'font-bold',
65 }}
66 >
67 Pathless Layout
68 </Link>{' '}
69 <Link
70 // @ts-expect-error
71 to="/this-route-does-not-exist"
72 activeProps={{
73 class: 'font-bold',
74 }}
75 >
76 This Route Does Not Exist
77 </Link>
78 </div>
79 <hr />
80 <Outlet />
81 <SolidQueryDevtools buttonPosition="top-right" />
82 <TanStackRouterDevtools position="bottom-right" />
83 </>
84 )
85}
86
87const indexRoute = createRoute({
88 getParentRoute: () => rootRoute,

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected