main
Branches
main (6.4.1)dev
Versions
6.4.1v4/5.xv3.x
createSearchParams

createSearchParams

Type declaration
declare function createSearchParams(
  init?: URLSearchParamsInit
): URLSearchParams;

createSearchParams is a thin wrapper around new URLSearchParams(init) that adds support for using objects with array values. This is the same function that useSearchParams uses internally for creating URLSearchParams objects from URLSearchParamsInit values.

Docs and examples CC 4.0
Edit