UNPKG

raviger

Version:

React routing with hooks

20 lines (19 loc) 633 B
import { QueryParam } from './querystring'; export interface RedirectProps { to: string; query?: QueryParam | URLSearchParams; replace?: boolean; merge?: boolean; } export interface UseRedirectProps { predicateUrl: string; targetUrl: string; queryParams?: QueryParam | URLSearchParams; replace?: boolean; } export declare function Redirect({ to, query, replace, merge, }: RedirectProps): JSX.Element | null; export declare function useRedirect(predicateUrl: string | null, targetUrl: string, { query, replace, merge, }?: { query?: QueryParam; replace?: boolean; merge?: boolean; }): void;