useMatches

useMatches

Summary

Reference Documentation ↗

Returns the active route matches, useful for accessing loaderData for parent/child routes or the route handle property

Signature

function useMatches(): UIMatch[]

Returns

An array of UI matches for the current route hierarchy

Docs and examples CC 4.0
Edit