react-stateshape 0.2.2 → 0.2.3

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.
Files changed (2) hide show
  1. package/README.md +2 -2
  2. package/package.json +49 -49
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` and the other routing hooks described here make 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)).
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,49 +1,49 @@
1
- {
2
- "name": "react-stateshape",
3
- "version": "0.2.2",
4
- "description": "A shared state management and routing lib for React apps",
5
- "main": "./dist/index.cjs",
6
- "module": "./dist/index.mjs",
7
- "types": "./dist/index.d.ts",
8
- "type": "module",
9
- "scripts": {
10
- "demo": "npx auxsrv tests/Shared_state_without_Context",
11
- "preversion": "npx npm-run-all shape test",
12
- "shape": "npx codeshape",
13
- "t3": "npx auxsrv tests/Tic-tac-toe",
14
- "test": "npx playwright test --project=chromium",
15
- "typecheck": "npx codeshape typecheck"
16
- },
17
- "repository": {
18
- "type": "git",
19
- "url": "git+https://github.com/axtk/react-stateshape.git"
20
- },
21
- "keywords": [
22
- "state",
23
- "state management",
24
- "react state management",
25
- "shared state",
26
- "global state",
27
- "routing",
28
- "react router"
29
- ],
30
- "license": "MIT",
31
- "author": "axtk",
32
- "peerDependencies": {
33
- "react": ">=16.8"
34
- },
35
- "devDependencies": {
36
- "@playwright/test": "^1.58.2",
37
- "@types/node": "^25.5.0",
38
- "@types/react": "^19.2.14",
39
- "@types/react-dom": "^19.2.3",
40
- "auxsrv": "^0.3.2",
41
- "immer": "^11.1.4",
42
- "react-dom": "^19.2.4",
43
- "url-shape": "^1.3.15",
44
- "zod": "^4.3.6"
45
- },
46
- "dependencies": {
47
- "stateshape": "^0.2.1"
48
- }
49
- }
1
+ {
2
+ "name": "react-stateshape",
3
+ "version": "0.2.3",
4
+ "description": "A shared state management and routing lib for React apps",
5
+ "main": "./dist/index.cjs",
6
+ "module": "./dist/index.mjs",
7
+ "types": "./dist/index.d.ts",
8
+ "type": "module",
9
+ "scripts": {
10
+ "demo": "npx auxsrv tests/Shared_state_without_Context",
11
+ "preversion": "npx npm-run-all shape test",
12
+ "shape": "npx codeshape",
13
+ "t3": "npx auxsrv tests/Tic-tac-toe",
14
+ "test": "npx playwright test --project=chromium",
15
+ "typecheck": "npx codeshape typecheck"
16
+ },
17
+ "repository": {
18
+ "type": "git",
19
+ "url": "git+https://github.com/axtk/react-stateshape.git"
20
+ },
21
+ "keywords": [
22
+ "state",
23
+ "state management",
24
+ "react state management",
25
+ "shared state",
26
+ "global state",
27
+ "routing",
28
+ "react router"
29
+ ],
30
+ "license": "MIT",
31
+ "author": "axtk",
32
+ "peerDependencies": {
33
+ "react": ">=16.8"
34
+ },
35
+ "devDependencies": {
36
+ "@playwright/test": "^1.58.2",
37
+ "@types/node": "^25.5.0",
38
+ "@types/react": "^19.2.14",
39
+ "@types/react-dom": "^19.2.3",
40
+ "auxsrv": "^0.3.2",
41
+ "immer": "^11.1.4",
42
+ "react-dom": "^19.2.4",
43
+ "url-shape": "^1.3.15",
44
+ "zod": "^4.3.6"
45
+ },
46
+ "dependencies": {
47
+ "stateshape": "^0.2.1"
48
+ }
49
+ }