react-use-url-state
Version:
React hook for managing state in the URL
7 lines (6 loc) • 439 B
TypeScript
import { DefaultSchema } from './types';
export declare function urlParamsToObject(params: URLSearchParams): Record<string, string | string[]>;
export declare function searchIsEmpty(search: string): boolean;
export declare function useShallowEqualValue<T>(value: T): T;
export declare function useStableSchema<T extends DefaultSchema>(schema: T): T;
export declare function serializeObjectToUrlParams(object: Record<string, any>): string;