state-in-url 4.1.5 → 4.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md
CHANGED
|
@@ -43,7 +43,7 @@ English | [한국어](./README.KO.md) | [简体中文](./README.CN.md)
|
|
|
43
43
|
|
|
44
44
|
<hr />
|
|
45
45
|
|
|
46
|
-
Add a
|
|
46
|
+
Add a <a href="#"><img src="https://raw.githubusercontent.com/acervenky/animated-github-badges/master/assets/starbadge.gif" width="25" height="25"></a> and <a href="https://github.com/asmyshlyaev177" target="_blank">follow me</a> to support the project!
|
|
47
47
|
|
|
48
48
|
Will appreciate you feedback/opinion on [discussions](https://github.com/asmyshlyaev177/state-in-url/discussions/1)
|
|
49
49
|
|
|
@@ -25,7 +25,7 @@ export declare function useUrlState<T extends JSONCompatible>({ defaultState: T,
|
|
|
25
25
|
*
|
|
26
26
|
* @param {JSONCompatible<T>} [defaultState] Fallback (default) values for state
|
|
27
27
|
* @param {Object} params - Object with other parameters
|
|
28
|
-
* @param {NavigateOptions} params.NavigateOptions See type from `react-router-dom`
|
|
28
|
+
* @param {NavigateOptions} params.NavigateOptions See type from [`react-router-dom`](https://api.reactrouter.com/v7/interfaces/react_router.NavigateOptions.html)
|
|
29
29
|
* @param {boolean} params.replace replace URL or push, default `true`
|
|
30
30
|
* @param {boolean} params.useHistory use window.history for navigation, default `false`
|
|
31
31
|
* @param {boolean} params.preventScrollReset keep scroll position, default `true`
|
|
@@ -62,8 +62,6 @@ export declare function useUrlState<T extends JSONCompatible>(defaultState: T, p
|
|
|
62
62
|
* setState({ name: 'test' });
|
|
63
63
|
* // or
|
|
64
64
|
* setState(curr => ({ ...curr, name: 'test' }) );
|
|
65
|
-
* // can pass optional React-Router `NavigateOptions`
|
|
66
|
-
* setState(curr => ({ ...curr, name: 'test' }) );
|
|
67
65
|
* ```
|
|
68
66
|
*
|
|
69
67
|
* * Docs {@link https://github.com/asmyshlyaev177/state-in-url/tree/master/packages/urlstate/react-router/useUrlState#updatestate}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "state-in-url",
|
|
3
|
-
"version": "4.1.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "4.1.6",
|
|
4
|
+
"description": "Store state in URL as in object, types and structure are preserved, with TS validation. Same API as React.useState, wthout any hasssle or boilerplate. Next.js@14-15 and react-router@6-7.",
|
|
5
5
|
"homepage": "https://state-in-url.dev",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -388,30 +388,57 @@
|
|
|
388
388
|
"wireit": "^0.14.9"
|
|
389
389
|
},
|
|
390
390
|
"keywords": [
|
|
391
|
-
"
|
|
392
|
-
"
|
|
391
|
+
"state in url",
|
|
392
|
+
"useSearchParams",
|
|
393
|
+
"useUrlState",
|
|
394
|
+
"url state",
|
|
395
|
+
"search params",
|
|
396
|
+
"nuqs alternative",
|
|
397
|
+
"reactive",
|
|
398
|
+
"json",
|
|
399
|
+
"state sync",
|
|
393
400
|
"state management",
|
|
394
|
-
"
|
|
395
|
-
"
|
|
401
|
+
"encode",
|
|
402
|
+
"decode",
|
|
403
|
+
"Next.js",
|
|
404
|
+
"react-router",
|
|
405
|
+
"url",
|
|
396
406
|
"url synchronization",
|
|
397
|
-
"
|
|
398
|
-
"state
|
|
407
|
+
"url sync",
|
|
408
|
+
"state synchronization",
|
|
409
|
+
"synchronized state",
|
|
410
|
+
"state-in-url",
|
|
411
|
+
"store",
|
|
412
|
+
"react hook",
|
|
413
|
+
"state hook",
|
|
414
|
+
"url-state",
|
|
399
415
|
"client components communication",
|
|
400
416
|
"query string",
|
|
401
|
-
"
|
|
417
|
+
"query-string",
|
|
418
|
+
"querystring",
|
|
419
|
+
"search-params",
|
|
420
|
+
"searchparams",
|
|
421
|
+
"params",
|
|
422
|
+
"parse",
|
|
423
|
+
"stringify",
|
|
402
424
|
"query params",
|
|
403
425
|
"typescript",
|
|
404
|
-
"workflow",
|
|
405
|
-
"javascript",
|
|
406
426
|
"hooks",
|
|
407
427
|
"react.js",
|
|
408
428
|
"reactjs",
|
|
409
429
|
"react",
|
|
410
430
|
"NextJS",
|
|
411
|
-
"Next.js",
|
|
412
|
-
"nuqs alternative",
|
|
413
431
|
"query params parser",
|
|
414
|
-
"query params parsing"
|
|
432
|
+
"query params parsing",
|
|
433
|
+
"shared state",
|
|
434
|
+
"state sharing",
|
|
435
|
+
"front-end",
|
|
436
|
+
"state-management",
|
|
437
|
+
"state-sync",
|
|
438
|
+
"search",
|
|
439
|
+
"encode url",
|
|
440
|
+
"decode url",
|
|
441
|
+
"fast"
|
|
415
442
|
],
|
|
416
443
|
"packageManager": "npm@10.8.2"
|
|
417
444
|
}
|