useMatches
Returns the active route matches, useful for accessing loaderData for parent/child routes or the route "handle" property
function useMatches(): {
id: string;
pathname: string;
params: Params<string>;
data: unknown;
handle: unknown;
}[];