synstate-react-hooks-compat 3.0.2 → 3.0.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.
Files changed (2) hide show
  1. package/README.md +5 -3
  2. package/package.json +9 -9
package/README.md CHANGED
@@ -1,8 +1,10 @@
1
- # SynState React hooks
1
+ # SynState React hooks (compat)
2
2
 
3
- synstate-react-hooks re-exports all exports from synstate except for `createState`, `createReducer`, and `createBooleanState`, and exports modified versions of those creation functions.
3
+ synstate-react-hooks-compat re-exports all exports from synstate except for `createState`, `createReducer`, and `createBooleanState`, and exports modified versions of those creation functions.
4
4
 
5
- The first element of the array returned by the `createState<T>` function provided by synstate-preact-hooks is changed from `InitializedObservable<T>` to a React hook `() => T`, and the `InitializedObservable<T>` has been moved to the `state` property in the object at index 2.
5
+ The first element of the array returned by the `createState<T>` function provided by synstate-react-hooks-compat is changed from `InitializedObservable<T>` to a React hook `() => T`, and the `InitializedObservable<T>` has been moved to the `state` property in the object at index 2.
6
+
7
+ This package provides the same API as [synstate-react-hooks](https://www.npmjs.com/package/synstate-react-hooks), but subscribes to observables with `useState` + `useEffect` instead of `useSyncExternalStore`, so it also works with React 16.8 and 17. Use synstate-react-hooks if you are on React 18 or later.
6
8
 
7
9
  ## Installation
8
10
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "synstate-react-hooks-compat",
3
- "version": "3.0.2",
3
+ "version": "3.0.4",
4
4
  "description": "SynState React hooks for React 16.8–17 (without useSyncExternalStore)",
5
5
  "repository": {
6
6
  "type": "git",
@@ -28,18 +28,18 @@
28
28
  "LICENSE"
29
29
  ],
30
30
  "dependencies": {
31
- "synstate": "3.0.2",
32
- "ts-data-forge": "^14.7.0",
31
+ "synstate": "3.0.4",
32
+ "ts-data-forge": "^14.7.1",
33
33
  "ts-type-forge": "^9.2.2"
34
34
  },
35
35
  "devDependencies": {
36
36
  "@testing-library/dom": "10.4.1",
37
37
  "@testing-library/react": "16.3.3",
38
- "@types/react": "19.2.18",
39
- "@types/react-dom": "19.2.7",
40
- "@vitest/browser-playwright": "4.1.11",
41
- "eslint-config-typed": "5.11.6",
42
- "eslint-plugin-ts-data-forge": "0.7.3",
38
+ "@types/react": "19.3.0",
39
+ "@types/react-dom": "19.3.0",
40
+ "@vitest/browser-playwright": "5.0.0",
41
+ "eslint-config-typed": "5.11.7",
42
+ "eslint-plugin-ts-data-forge": "0.7.4",
43
43
  "eslint-plugin-ts-fortress": "1.2.2",
44
44
  "eslint-plugin-ts-type-forge": "0.8.3",
45
45
  "playwright": "1.62.1",
@@ -48,7 +48,7 @@
48
48
  "prettier-plugin-packagejson": "3.0.2",
49
49
  "react": "19.2.8",
50
50
  "react-dom": "19.2.8",
51
- "ts-repo-utils": "10.6.1"
51
+ "ts-repo-utils": "10.6.2"
52
52
  },
53
53
  "peerDependencies": {
54
54
  "react": ">=16.8.0"