Socket
Socket
Sign inDemoInstall

use-query-params

Package Overview
Dependencies
10
Maintainers
1
Versions
41
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.1.0 to 1.1.1

2

esm/useQueryParam.d.ts

@@ -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 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc