Skip to content

Is there a way to get automatic types when configuring global params? #291

@bruce-c-liu

Description

@bruce-c-liu

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions