react-stateshape 0.2.2 → 0.2.4
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 +2 -2
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -105,7 +105,7 @@ let counterState = new PersistentState(0, { key: "counter" });
|
|
|
105
105
|
|
|
106
106
|
⬥ Set up interaction with a custom storage by setting `{ read(), write(value)? }` as `options` in `new PersistentState(value, options)`.
|
|
107
107
|
|
|
108
|
-
⬥ `PersistentState` skips interaction with the browser storage in non-browser environments, which makes it usable with SSR.
|
|
108
|
+
⬥ `PersistentState` skips interaction with the browser storage in non-browser environments, which makes it usable with SSR. One way to avoid mismatch errors while hydrating SSR content based on a persisent state restored in the browser is using client-side rendering detection utilities such as [`react-clientside`](https://www.npmjs.com/package/react-clientside).
|
|
109
109
|
|
|
110
110
|
## useRoute
|
|
111
111
|
|
|
@@ -133,7 +133,7 @@ let App = () => {
|
|
|
133
133
|
|
|
134
134
|
⬥ `params` in dynamic values (as in `({ params }) => <Section id={params.id}/>` above) contains the URL pattern's capturing groups.
|
|
135
135
|
|
|
136
|
-
⬥ By default, `useRoute`
|
|
136
|
+
⬥ By default, `useRoute` makes use of the browser's URL, if it's available. Otherwise, use `<RouteProvider href={url}>` to set a specific URL value. Common use cases: SSR and tests. A less common use case: custom routing behavior, including custom non-URL-based routing ([example](https://codesandbox.io/p/sandbox/tykt44?file=%252Fsrc%252FApp.tsx)).
|
|
137
137
|
|
|
138
138
|
⬥ See also the [Type-safe routes](#type-safe-routes) section.
|
|
139
139
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-stateshape",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.4",
|
|
4
4
|
"description": "A shared state management and routing lib for React apps",
|
|
5
5
|
"main": "./dist/index.cjs",
|
|
6
6
|
"module": "./dist/index.mjs",
|
|
@@ -37,13 +37,13 @@
|
|
|
37
37
|
"@types/node": "^25.5.0",
|
|
38
38
|
"@types/react": "^19.2.14",
|
|
39
39
|
"@types/react-dom": "^19.2.3",
|
|
40
|
-
"auxsrv": "^0.3.
|
|
40
|
+
"auxsrv": "^0.3.10",
|
|
41
41
|
"immer": "^11.1.4",
|
|
42
42
|
"react-dom": "^19.2.4",
|
|
43
43
|
"url-shape": "^1.3.15",
|
|
44
44
|
"zod": "^4.3.6"
|
|
45
45
|
},
|
|
46
46
|
"dependencies": {
|
|
47
|
-
"stateshape": "^0.2.
|
|
47
|
+
"stateshape": "^0.2.2"
|
|
48
48
|
}
|
|
49
49
|
}
|