react-router-use-location-state
Advanced tools
Comparing version 2.0.1 to 2.1.0
@@ -52,2 +52,3 @@ 'use strict'; | ||
if (router && router.history) { | ||
// eslint-disable-next-line react-hooks/rules-of-hooks | ||
queryStringInterface = useReactRouterQueryStringInterface(router.history); | ||
@@ -54,0 +55,0 @@ } |
import { QueryStateOpts, SetQueryStateItemFn } from 'use-location-state/dist/hooks/types'; | ||
import { RouteComponentProps } from 'react-router'; | ||
export declare function useRouter<T = {}>(): RouteComponentProps<T>; | ||
export declare function useRouter(): import("react-router").RouteComponentProps<{}, import("react-router").StaticContext, any>; | ||
export declare function useQueryState<T>(itemName: string, defaultValue: T, queryStateOpts?: QueryStateOpts): [T, SetQueryStateItemFn<T>]; |
@@ -48,2 +48,3 @@ import { useQueryState as useQueryState$1 } from 'use-location-state'; | ||
if (router && router.history) { | ||
// eslint-disable-next-line react-hooks/rules-of-hooks | ||
queryStringInterface = useReactRouterQueryStringInterface(router.history); | ||
@@ -50,0 +51,0 @@ } |
@@ -12,5 +12,5 @@ { | ||
"dependencies": { | ||
"use-location-state": "^2.0.1" | ||
"use-location-state": "^2.1.0" | ||
}, | ||
"version": "2.0.1", | ||
"version": "2.1.0", | ||
"author": "Felix Leupold <felix@xiel.de>", | ||
@@ -21,9 +21,11 @@ "homepage": "https://github.com/xiel/use-location-state", | ||
"@types/react": "^16.8.14", | ||
"@types/react-router": "^4.4.5", | ||
"@types/react-router": "^5.0.0", | ||
"@types/react-router-dom": "^4.3.3", | ||
"react": "^16.8.6", | ||
"react-router": "^5.0.0", | ||
"rollup": "^1.0.0", | ||
"react-router-dom": "^5.0.0", | ||
"rollup": "^1.14.3", | ||
"rollup-plugin-typescript2": "^0.21.0", | ||
"tslib": "^1.9.3", | ||
"typescript": "3.4.5" | ||
"typescript": "3.5.1" | ||
}, | ||
@@ -36,3 +38,3 @@ "files": [ | ||
"build": "rollup -c", | ||
"start": "rollup -c -w", | ||
"dev": "rollup -c -w", | ||
"test": "echo \"Error: run tests from root\" && exit 1" | ||
@@ -46,3 +48,3 @@ }, | ||
}, | ||
"gitHead": "dbda4384832293fd9fb3371d940333a9633f292d" | ||
"gitHead": "eefc753436adb9dd16eeeebcfab5456beb77534b" | ||
} |
12740
116
10
Updateduse-location-state@^2.1.0