Merge pull request #34580 from wszgxa/fix-react-router-config

[@types/react-router-config]Enable router config pass data or function
This commit is contained in:
Armando Aguirre
2019-04-16 17:14:04 -07:00
committed by GitHub
2 changed files with 3 additions and 1 deletions

View File

@@ -22,6 +22,7 @@ export interface RouteConfig {
exact?: boolean;
strict?: boolean;
routes?: RouteConfig[];
[propName: string]: any;
}
export interface MatchedRoute<Params extends { [K in keyof Params]?: string }> {

View File

@@ -46,7 +46,8 @@ const routes: RouteConfig[] = [
routes: [{
path: "/child/:id/grand-child",
component: GrandChild
}]
}],
loadData: () => Promise.resolve({})
}
]
}