@acrool/react-router-hash
Version:
Hash Route + History Route Additional based for React Route v6
27 lines (26 loc) • 1.04 kB
TypeScript
import { default as React } from 'react';
/**
* Returns the context (if provided) for the child route at this level of the route
* hierarchy.
* @see https://reactrouter.com/docs/en/v6/api#useoutletcontext
* @see https://github.com/remix-run/react-router/blob/v6.3.0/packages/react-router/lib/hooks.tsx#L203
*/
export declare function useHashOutletContext<Context = unknown>(): Context;
/**
* use Hash Outlet
* @see https://github.com/remix-run/react-router/blob/v6.3.0/packages/react-router/lib/hooks.tsx#L213
* @param context
*/
export declare function useHashOutlet(context?: unknown): React.ReactElement | null;
/**
* use Hash Params
* @see https://github.com/remix-run/react-router/blob/v6.3.0/packages/react-router/lib/hooks.tsx#L229
*/
export declare function useHashParams<Params extends {
[K in keyof Params]?: string;
} = {}>(): Params;
/**
* use Hash Pathname
* @see https://github.com/remix-run/react-router/blob/v6.3.0/packages/react-router/lib/hooks.tsx#L74
*/
export declare function useHashPathname(): string;