参考文档 ↗
返回当前活动的路由匹配项,用于访问父/子路由的 loaderData 或路由的 handle 属性。
loaderData
handle
function useMatches(): UIMatch[]
当前路由层次结构的 UI 匹配项数组。