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

Function Matches

packages/solid-router/src/Matches.tsx:41–67  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

39}
40
41export function Matches() {
42 const router = useRouter()
43
44 const ResolvedSuspense =
45 (isServer ?? router.isServer) ||
46 (typeof document !== 'undefined' && router.ssr)
47 ? SafeFragment
48 : Solid.Suspense
49
50 const rootRoute: () => AnyRoute = () => router.routesById[rootRouteId]
51 const PendingComponent =
52 rootRoute().options.pendingComponent ??
53 router.options.defaultPendingComponent
54
55 const OptionalWrapper = router.options.InnerWrap || SafeFragment
56
57 return (
58 <OptionalWrapper>
59 <ResolvedSuspense
60 fallback={PendingComponent ? <PendingComponent /> : null}
61 >
62 <Transitioner />
63 <MatchesInner />
64 </ResolvedSuspense>
65 </OptionalWrapper>
66 )
67}
68
69function MatchesInner() {
70 const router = useRouter()

Callers

nothing calls this directly

Calls 2

useRouterFunction · 0.90
rootRouteFunction · 0.70

Tested by

no test coverage detected