UrlQueryParamTypes
An enum listing all the query parameter types that have built-in serializers for encoding in and decoding from the URL.
number
- Used for numbers (integers or floats)string
- Used for stringsobject
- Used for objectsarray
- Used for arraysjson
- Used for generic JSON valuesdate
- Used for Date valuesboolean
- Used for boolean valuesnumericObject
- Used for objects where all values are numbersnumericArray
- Used for arrays where all values are arrays
Examples
import { UrlQueryParamTypes } from 'react-url-query';
const urlPropsQueryConfig = {
foo: { type: UrlQueryParamTypes.number },
};