use-query-params
Advanced tools
Comparing version 1.1.0 to 1.1.1
@@ -17,3 +17,3 @@ import { QueryParamConfig } from 'serialize-query-params'; | ||
*/ | ||
export declare const useQueryParam: <D, D2 = D>(name: string, paramConfig?: QueryParamConfig<D, D2>) => [D2 | undefined, (newValue: NewValueType<D>, updateType?: "replace" | "push" | "replaceIn" | "pushIn" | undefined) => void]; | ||
export declare const useQueryParam: <D, D2 = D>(name: string, paramConfig?: QueryParamConfig<D, D2>) => [D2, (newValue: NewValueType<D>, updateType?: "replace" | "push" | "replaceIn" | "pushIn" | undefined) => void]; | ||
export {}; |
@@ -17,3 +17,3 @@ import { QueryParamConfig } from 'serialize-query-params'; | ||
*/ | ||
export declare const useQueryParam: <D, D2 = D>(name: string, paramConfig?: QueryParamConfig<D, D2>) => [D2 | undefined, (newValue: NewValueType<D>, updateType?: "replace" | "push" | "replaceIn" | "pushIn" | undefined) => void]; | ||
export declare const useQueryParam: <D, D2 = D>(name: string, paramConfig?: QueryParamConfig<D, D2>) => [D2, (newValue: NewValueType<D>, updateType?: "replace" | "push" | "replaceIn" | "pushIn" | undefined) => void]; | ||
export {}; |
{ | ||
"name": "use-query-params", | ||
"version": "1.1.0", | ||
"version": "1.1.1", | ||
"description": "React Hook for managing state in URL query parameters with easy serialization.", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
@@ -235,2 +235,4 @@ <div align="center"> | ||
The React Router and Reach Router examples contain simple tests showing how to use the library with [React Testing Library](https://testing-library.com/docs/react-testing-library/intro). | ||
### API | ||
@@ -331,4 +333,4 @@ | ||
The setter takes two arguments `(newValue, updateType)` where updateType | ||
is one of `'replace' | 'replaceIn' | 'push' | 'pushIn'`, defaulting to | ||
`'replaceIn'`. | ||
is one of `'pushIn' | 'push' | 'replaceIn' | 'replace'`, defaulting to | ||
`'pushIn'`. | ||
@@ -368,4 +370,4 @@ You may optionally pass in a rawQuery object, otherwise the query is derived | ||
The setter takes two arguments `(newQuery, updateType)` where updateType | ||
is one of `'replace' | 'replaceIn' | 'push' | 'pushIn'`, defaulting to | ||
`'replaceIn'`. | ||
is one of `'pushIn' | 'push' | 'replaceIn' | 'replace'`, defaulting to | ||
`'pushIn'`. | ||
@@ -428,4 +430,4 @@ **Example** | ||
The setter takes two arguments `(newQuery, updateType)` where updateType | ||
is one of `'replace' | 'replaceIn' | 'push' | 'pushIn'`, defaulting to | ||
`'replaceIn'`. | ||
is one of `'pushIn' | 'push' | 'replaceIn' | 'replace'`, defaulting to | ||
`'pushIn'`. | ||
@@ -464,4 +466,4 @@ **Example** | ||
The setter takes two arguments `(newQuery, updateType)` where updateType | ||
is one of `'replace' | 'replaceIn' | 'push' | 'pushIn'`, defaulting to | ||
`'replaceIn'`. | ||
is one of `'pushIn' | 'push' | 'replaceIn' | 'replace'`, defaulting to | ||
`'pushIn'`. | ||
@@ -468,0 +470,0 @@ |
91305
573