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

Function IndexComponent

packages/react-router/tests/useBlocker.test.tsx:38–50  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

36 const rootRoute = createRootRoute()
37
38 const IndexComponent = () => {
39 const navigate = useNavigate()
40
41 useBlocker({ shouldBlockFn: () => false })
42
43 return (
44 <>
45 <h1>Index</h1>
46 <button onClick={() => navigate({ to: '/' })}>Index</button>
47 <button onClick={() => navigate({ to: '/posts' })}>Posts</button>
48 </>
49 )
50 }
51
52 const indexRoute = createRoute({
53 getParentRoute: () => rootRoute,

Callers

nothing calls this directly

Calls 3

useNavigateFunction · 0.90
useBlockerFunction · 0.90
navigateFunction · 0.50

Tested by

no test coverage detected