MCPcopy
hub / github.com/TanStack/router / IndexComponent

Function IndexComponent

packages/react-router/tests/useNavigate.test.tsx:48–57  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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,

Callers

nothing calls this directly

Calls 2

useNavigateFunction · 0.90
navigateFunction · 0.50

Tested by

no test coverage detected