Open History to see the last commit
1import {
2 HeadContent,
3 Link,
4 Outlet,
5 Scripts,
6 createRootRouteWithContext,
7} from '@tanstack/solid-router'
8import { Suspense } from 'solid-js'
9import { HydrationScript } from 'solid-js/web'
10β
11export const Route = createRootRouteWithContext()({
12 head: () => ({ meta: [{ charset: 'utf-8' }] }),
13 shellComponent: RootDocument,
14})
15β
16function RootDocument() {
17 return (
18 <html>
19 <head>
20 <HydrationScript />
21 </head>
22 <body>
23 <HeadContent />
24 <nav>
25 <Link to="/">Home</Link> <Link to="/layout/page2">π To page2</Link>
26 </nav>
27 <Suspense>
28 <Outlet />
29 </Suspense>
30 <Scripts />
31 </body>
32 </html>
33 )
34}