what-react 0.6.0 → 0.6.2

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/package.json +2 -2
  2. package/src/index.js +10 -5
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "what-react",
3
- "version": "0.6.0",
3
+ "version": "0.6.2",
4
4
  "description": "React compatibility layer for What Framework — use React packages with signals under the hood",
5
5
  "type": "module",
6
6
  "main": "src/index.js",
@@ -23,7 +23,7 @@
23
23
  "compatibility"
24
24
  ],
25
25
  "peerDependencies": {
26
- "what-core": "^0.6.0"
26
+ "what-core": "^0.6.2"
27
27
  },
28
28
  "author": "ZVN DEV (https://zvndev.com)",
29
29
  "license": "MIT",
package/src/index.js CHANGED
@@ -22,11 +22,6 @@ import {
22
22
  lazy as whatLazy,
23
23
  Suspense as WhatSuspense,
24
24
  ErrorBoundary as WhatErrorBoundary,
25
- useState as whatUseState,
26
- useEffect as whatUseEffect,
27
- useMemo as whatUseMemo,
28
- useCallback as whatUseCallback,
29
- useRef as whatUseRef,
30
25
  useContext as whatUseContext,
31
26
  useReducer as whatUseReducer,
32
27
  createContext as whatCreateContext,
@@ -34,6 +29,16 @@ import {
34
29
  onCleanup,
35
30
  } from 'what-core';
36
31
 
32
+ // React-style hooks are not exported from what-core's main entry (by design).
33
+ // Import them from the hooks subpath for react-compat use only.
34
+ import {
35
+ useState as whatUseState,
36
+ useEffect as whatUseEffect,
37
+ useMemo as whatUseMemo,
38
+ useCallback as whatUseCallback,
39
+ useRef as whatUseRef,
40
+ } from 'what-core/hooks';
41
+
37
42
  // ---- Re-export What's hooks with React-compatible names ----
38
43
 
39
44
  export const useState = whatUseState;