()
| 46 | const rootRoute = createRootRoute() |
| 47 | |
| 48 | const IndexComponent = () => { |
| 49 | const navigate = useNavigate() |
| 50 | return ( |
| 51 | <> |
| 52 | <h1>Index</h1> |
| 53 | <button onClick={() => navigate({ to: '/' })}>Index</button> |
| 54 | <button onClick={() => navigate({ to: '/posts' })}>Posts</button> |
| 55 | </> |
| 56 | ) |
| 57 | } |
| 58 | |
| 59 | const indexRoute = createRoute({ |
| 60 | getParentRoute: () => rootRoute, |
nothing calls this directly
no test coverage detected