UNPKG

wouter-search

Version:

Provide useSearchParams(), useSearchParam() and useSearchParamJson() hooks for wouter

7 lines (6 loc) 360 B
import type { SetSearchParams } from 'wouter'; export type SetSearchParam = (nextInit: string | null | ((prev: string | null) => string | null), options?: { replace?: boolean; state?: any; }) => void; export declare function useSearchParam(key: string, searchParams: URLSearchParams, setSearchParams: SetSearchParams): [string | null, SetSearchParam];