@shuvi/router-react 1.0.25 → 1.0.26
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/esm/hooks.js +1 -1
- package/lib/hooks.js +1 -1
- package/package.json +4 -4
package/esm/hooks.js
CHANGED
|
@@ -93,7 +93,7 @@ export function useNavigate() {
|
|
|
93
93
|
* URL that were matched by the route path.
|
|
94
94
|
*/
|
|
95
95
|
export function useParams() {
|
|
96
|
-
return useContext(
|
|
96
|
+
return useContext(RouteContext).params;
|
|
97
97
|
}
|
|
98
98
|
/**
|
|
99
99
|
* Resolves the pathname of the given `to` value against the current location.
|
package/lib/hooks.js
CHANGED
|
@@ -102,7 +102,7 @@ exports.useNavigate = useNavigate;
|
|
|
102
102
|
* URL that were matched by the route path.
|
|
103
103
|
*/
|
|
104
104
|
function useParams() {
|
|
105
|
-
return (0, react_1.useContext)(contexts_1.
|
|
105
|
+
return (0, react_1.useContext)(contexts_1.RouteContext).params;
|
|
106
106
|
}
|
|
107
107
|
exports.useParams = useParams;
|
|
108
108
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shuvi/router-react",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.26",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/shuvijs/shuvi.git",
|
|
@@ -28,9 +28,9 @@
|
|
|
28
28
|
"node": ">= 16.0.0"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@shuvi/router": "1.0.
|
|
32
|
-
"@shuvi/platform-shared": "1.0.
|
|
33
|
-
"@shuvi/utils": "1.0.
|
|
31
|
+
"@shuvi/router": "1.0.26",
|
|
32
|
+
"@shuvi/platform-shared": "1.0.26",
|
|
33
|
+
"@shuvi/utils": "1.0.26",
|
|
34
34
|
"prop-types": "^15.8.1",
|
|
35
35
|
"use-sync-external-store": "1.2.0"
|
|
36
36
|
},
|