When I utilize the useSearchParams hook in my component, I encounter an issue where I am unable to type parameters when passing the hook to props or function arguments.
import { useSearchParams } from 'react-router-dom';
const urlSearchParamState = useSearchParams();
const [searchParams, setSearchParams] = urlSearchParamState;
Is there a way to import types from the hook?
export declare function useSearchParams(defaultInit?: URLSearchParamsInit): [URLSearchParams, SetURLSearchParams];