6.0.0 (2023-12-27)
5.7.4 (2023-03-05)
5.7.3 (2023-01-09)
5.7.2 (2022-11-21)
5.7.1 (2022-11-10)
5.7.0 (2022-10-22)
- Add MIT License (7895170)
5.6.1 (2022-10-19)
5.6.0 (2022-08-30)
5.5.0 (2022-08-17)
5.4.0 (2022-08-04)
5.3.0 (2022-07-10)
5.2.1 (2022-02-28)
5.2.0 (2022-02-28)
5.1.1 (2021-11-21)
5.1.0 (2021-11-20)
5.0.0 (2021-09-30)
4.2.4 (2021-09-26)
- Dependabot upgrades (6c0cb56)
4.2.3 (2021-09-09)
4.2.2 (2021-07-26)
Add useUrlState
to change both Route Params and Query String.
useUrlState
: with type(defaultValues?: UrlState): [UrlState, DispatchState<UrlState>]
.
Update useQueryStringKey
to allow dispatch.
- Hooks test coverage. Now we can reproduce bug easily.
useQueryStringKey
: now with the type(key: string, defaultValue?: string) => [string | undefined, Dispatch<SetStateAction<string>>]
(Now you can update with the previous value)- breaking changes: The behaviour of
useQueryStringKey
in case of updating with empty string orundefined
was not clear. You may expect for breaking changes in this case.
Dependencies Upgrades.
- Bumps @rollup/plugin-commonjs from 18.0.0 to 19.0.0.
- Bumps hosted-git-info from 2.8.8 to 2.8.9.
- Bumps @testing-library/react-hooks from 5.0.3 to 6.0.0.
Major release fixes.
QueryStringKey
resets the query string.
Change the API to the useState
interface.
useRouteParams
: with the type(defaultValues?: Record<string, string>) => [Record<string, string>, DispatchState]
useQueryString
: with the type(defaultValues?: Record<string, string>) => [Record<string, string>, DispatchState]
useQueryStringKey
: with the type(key: string, defaultValue?: string) => [string | undefined, (updatedValue: string) => void]
- DEPRECATED:
useParamsAsState
,useQueryAsState
,useQueryKeyAsState