• 准备搜索索引...
  • 搜索索引不可用
React Router API 参考
  • React Router API 参考
  • react-router
  • matchRoutes

函数 matchRoutes

  • matchRoutes<RouteObjectType>(routes, locationArg, basename?): AgnosticRouteMatch<string, RouteObjectType>[] | null
  • 将给定的路由与 location 匹配,并返回匹配数据。

    类型参数

    • RouteObjectType extends AgnosticRouteObject = AgnosticRouteObject

    参数

    • routes: RouteObjectType[]
    • locationArg: string | Partial<Location<any>>
    • basename: string = "/"

    返回 AgnosticRouteMatch<string, RouteObjectType>[] | null

    • 定义在 packages/react-router/lib/router/utils.ts:506

设置

成员可见性
React Router API 参考
  • 加载中...

使用 TypeDoc 生成