Open History to see the last commit
1import { HeadContent, Scripts, createRootRoute } from '@tanstack/react-router'
2import { TanStackDevtools } from '@tanstack/react-devtools'
3import { formDevtoolsPlugin } from '@tanstack/react-form-devtools'
4β
5export const Route = createRootRoute({
6 head: () => ({
7 meta: [
8 {
9 charSet: 'utf-8',
10 },
11 {
12 name: 'viewport',
13 content: 'width=device-width, initial-scale=1',
14 },
15 {
16 title: 'TanStack Form + Start',
17 },
18 ],
19 links: [
20 {
21 rel: 'icon',
22 type: 'image/svg+xml',
23 href: '/emblem-light.svg',
24 },
25 ],
26 }),
27 notFoundComponent: () => {
28 return <div>Not found</div>
29 },
30 shellComponent: RootDocument,
31})
32β
33function RootDocument({ children }: { children: React.ReactNode }) {
34 return (
35 <html>
36 <head>
37 <HeadContent />
38 </head>
39 <body>
40 {children}
41 <Scripts />
42 <TanStackDevtools plugins={[formDevtoolsPlugin()]} />
43 </body>
44 </html>
45 )
46}