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

Function RouteComponent

packages/solid-router/tests/Matches.test.tsx:323–343  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

321 })
322
323 function RouteComponent() {
324 const routeParams = Route.useParams()
325 const matchRoute = useMatchRoute()
326 const matchRouteMatch = matchRoute({
327 to: path,
328 })
329
330 return (
331 <div>
332 <h1 data-testid="heading">{name}</h1>
333 <div>
334 Params{' '}
335 <span data-testid="params">{JSON.stringify(routeParams())}</span>
336 Matches{' '}
337 <span data-testid="matches">
338 {JSON.stringify(matchRouteMatch())}
339 </span>
340 </div>
341 </div>
342 )
343 }
344
345 const router = createRouter({
346 routeTree: rootRoute.addChildren([Route]),

Callers

nothing calls this directly

Calls 1

useMatchRouteFunction · 0.90

Tested by

no test coverage detected