getRouterState A getter for router state. Types interface RouterLocation { pathname: string; search: string; type: 'push' | 'replace'; } interface RouterState { location: RouterLocation | null; prevLocation: RouterLocation | null; }