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

export-default-component.tsx

16 lines319 Bytes

1import React, { useState } from 'react'
2import { createFileRoute } from '@tanstack/react-router'
3​
4export const Route = createFileRoute('/home')({
5 component: Home,
6})
7​
8export default function Home() {
9 const [one, setOne] = useState('this is from a state')
10​
11 return (
12 <div>
13 <h1>{one}</h1>
14 </div>
15 )