Merge pull request #8352 from GiedriusGrabauskas/patch-1

react-router: Added setRouteLeaveHook function
This commit is contained in:
Masahiro Wakame
2016-03-04 21:51:57 +09:00
+1
View File
@@ -220,6 +220,7 @@ declare namespace ReactRouter {
listenBeforeLeavingRoute(route: PlainRoute, hook: RouteHook): void
match(location: H.Location, callback: (error: any, nextState: RouterState, nextLocation: H.Location) => void): void
isActive(pathname: H.Pathname, query?: H.Query, indexOnly?: boolean): boolean
setRouteLeaveHook(route: PlainRoute, callback: RouteHook): void
}
function useRoutes<T>(createHistory: HistoryModule.CreateHistory<T>): HistoryModule.CreateHistory<T & HistoryRoutes>