use-query-params
use-query-params copied to clipboard
Is there a way to get automatic types when configuring global params?
For example, I have the following:
<QueryParamProvider
adapter={ReactRouter6Adapter}
options={{
params: {
page: PAGE_SEARCH_PARAM_TYPE,
},
removeDefaultsFromUrl: true,
}}
>
Is there an automatic way to get Typescript types for page
and setPage
when I do:
const [page, setPage] = useQueryParam("page");
page
and setPage
are unknown
right now.