Skip to content
Source
Sign inSign up
TanStack/router
Open History to see the last commit

inline.tsx

25 lines568 Bytes

1import * as React from 'react'
2import { createFileRoute } from '@tanstack/react-router'
3​
4import * as styles from '../style.css'
5import { TEST_DATA } from '../test.const'
6​
7const Button = (props: { children: any }) => {
8 return <button>{props.children}</button>
9}
10​
11export const Route = createFileRoute('/')({
12 component: () => {
13 return (
14 <div className="p-2">
15 {test}
16 <h3 className={styles.indexPageTitle}>{TEST_DATA.welcome}</h3>
17 <Button>Click me</Button>
18 </div>
19 )
20 },
21})
22​
23Route.addChildren([])
24​
25export const test = 'test'