MCPcopy Index your code
hub / github.com/TanStack/router / IndexComponent

Function IndexComponent

packages/solid-router/tests/useBlocker.test.tsx:28–40  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

26 const rootRoute = createRootRoute()
27
28 const IndexComponent = () => {
29 const navigate = useNavigate()
30
31 useBlocker({ shouldBlockFn: () => false })
32
33 return (
34 <>
35 <h1>Index</h1>
36 <button onClick={() => navigate({ to: '/' })}>Index</button>
37 <button onClick={() => navigate({ to: '/posts' })}>Posts</button>
38 </>
39 )
40 }
41
42 const indexRoute = createRoute({
43 getParentRoute: () => rootRoute,

Callers

nothing calls this directly

Calls 3

useNavigateFunction · 0.90
useBlockerFunction · 0.90
navigateFunction · 0.50

Tested by

no test coverage detected