@molecule/app-routing-react-router 1.2.4 → 1.2.5
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 +9 -3
- package/dist/index.d.ts +8 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +8 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -3,7 +3,7 @@ AUTO-GENERATED — DO NOT EDIT THIS FILE.
|
|
|
3
3
|
Generated by `mlcl sync-docs` from the package's src/index.ts JSDoc + mlcl/registry.json.
|
|
4
4
|
Edits here are overwritten on the next commit (molecule's pre-commit hook regenerates).
|
|
5
5
|
To change this document, edit the module-level JSDoc in src/index.ts.
|
|
6
|
-
Generated: 2026-11-
|
|
6
|
+
Generated: 2026-11-09T16:18:22.180Z
|
|
7
7
|
-->
|
|
8
8
|
|
|
9
9
|
# @molecule/app-routing-react-router
|
|
@@ -23,8 +23,14 @@ so multiple consumers cannot overwrite the global router bond.
|
|
|
23
23
|
|
|
24
24
|
**Paginated or filtered page? Use `useListRoute` for its URL state.** It reads
|
|
25
25
|
page, filters and selected views from the current URL; builds links that retain
|
|
26
|
-
the current path/filters; and resets page when a filter or view changes.
|
|
27
|
-
|
|
26
|
+
the current path/filters; and resets page when a filter or view changes.
|
|
27
|
+
Start with `const pages = useListRoute()`; `filters` and `selections` are optional.
|
|
28
|
+
On `/category/books` matched by `/category/:slug`, `pages.href({ page: 2 })` is
|
|
29
|
+
`/category/books?page=2` and `pages.params.slug` is `'books'`. The route's path
|
|
30
|
+
params need no extra config and never become duplicate query filters. On
|
|
31
|
+
`/?view=mine`, the same call is `/?view=mine&page=2`: existing query keys keep
|
|
32
|
+
their order, with page last. Page one omits `page`; unrelated queries and hash
|
|
33
|
+
survive. Add `path` when changing path params, or `selections` when linking views.
|
|
28
34
|
It works under ordinary `BrowserRouter` without a data router or an extra provider.
|
|
29
35
|
|
|
30
36
|
> **Auto-generated, AI-first package reference** for the [molecule.dev](https://molecule.dev) ecosystem.
|
package/dist/index.d.ts
CHANGED
|
@@ -14,8 +14,14 @@
|
|
|
14
14
|
*
|
|
15
15
|
* **Paginated or filtered page? Use `useListRoute` for its URL state.** It reads
|
|
16
16
|
* page, filters and selected views from the current URL; builds links that retain
|
|
17
|
-
* the current path/filters; and resets page when a filter or view changes.
|
|
18
|
-
*
|
|
17
|
+
* the current path/filters; and resets page when a filter or view changes.
|
|
18
|
+
* Start with `const pages = useListRoute()`; `filters` and `selections` are optional.
|
|
19
|
+
* On `/category/books` matched by `/category/:slug`, `pages.href({ page: 2 })` is
|
|
20
|
+
* `/category/books?page=2` and `pages.params.slug` is `'books'`. The route's path
|
|
21
|
+
* params need no extra config and never become duplicate query filters. On
|
|
22
|
+
* `/?view=mine`, the same call is `/?view=mine&page=2`: existing query keys keep
|
|
23
|
+
* their order, with page last. Page one omits `page`; unrelated queries and hash
|
|
24
|
+
* survive. Add `path` when changing path params, or `selections` when linking views.
|
|
19
25
|
* It works under ordinary `BrowserRouter` without a data router or an extra provider.
|
|
20
26
|
*
|
|
21
27
|
* @example
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyLG;AAEH,cAAc,YAAY,CAAA;AAC1B,cAAc,eAAe,CAAA;AAC7B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,eAAe,CAAA;AAC7B,cAAc,cAAc,CAAA;AAC5B,YAAY,EACV,WAAW,EACX,eAAe,EACf,eAAe,EACf,WAAW,EACX,iBAAiB,EACjB,gBAAgB,EAChB,mBAAmB,EACnB,eAAe,EACf,aAAa,EACb,UAAU,EACV,WAAW,EACX,YAAY,GACb,MAAM,YAAY,CAAA;AACnB,cAAc,mBAAmB,CAAA;AACjC,cAAc,gBAAgB,CAAA"}
|
package/dist/index.js
CHANGED
|
@@ -14,8 +14,14 @@
|
|
|
14
14
|
*
|
|
15
15
|
* **Paginated or filtered page? Use `useListRoute` for its URL state.** It reads
|
|
16
16
|
* page, filters and selected views from the current URL; builds links that retain
|
|
17
|
-
* the current path/filters; and resets page when a filter or view changes.
|
|
18
|
-
*
|
|
17
|
+
* the current path/filters; and resets page when a filter or view changes.
|
|
18
|
+
* Start with `const pages = useListRoute()`; `filters` and `selections` are optional.
|
|
19
|
+
* On `/category/books` matched by `/category/:slug`, `pages.href({ page: 2 })` is
|
|
20
|
+
* `/category/books?page=2` and `pages.params.slug` is `'books'`. The route's path
|
|
21
|
+
* params need no extra config and never become duplicate query filters. On
|
|
22
|
+
* `/?view=mine`, the same call is `/?view=mine&page=2`: existing query keys keep
|
|
23
|
+
* their order, with page last. Page one omits `page`; unrelated queries and hash
|
|
24
|
+
* survive. Add `path` when changing path params, or `selections` when linking views.
|
|
19
25
|
* It works under ordinary `BrowserRouter` without a data router or an extra provider.
|
|
20
26
|
*
|
|
21
27
|
* @example
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyLG;AAEH,cAAc,YAAY,CAAA;AAC1B,cAAc,eAAe,CAAA;AAC7B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,eAAe,CAAA;AAC7B,cAAc,cAAc,CAAA;AAe5B,cAAc,mBAAmB,CAAA;AACjC,cAAc,gBAAgB,CAAA"}
|