useMatches

external fun useMatches(): ReadonlyArray<UIMatch<*, *>>(source)

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