@stryke/hooks 0.1.4 → 0.2.1
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.
|
@@ -4,6 +4,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.useIsomorphicLayoutEffect = void 0;
|
|
7
|
-
var
|
|
7
|
+
var _runtimeChecks = require("@stryke/env/runtime-checks");
|
|
8
8
|
var _react = require("react");
|
|
9
|
-
const useIsomorphicLayoutEffect = exports.useIsomorphicLayoutEffect =
|
|
9
|
+
const useIsomorphicLayoutEffect = exports.useIsomorphicLayoutEffect = _runtimeChecks.isRuntimeServer ? _react.useEffect : _react.useLayoutEffect;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{isRuntimeServer as e}from"@stryke/
|
|
1
|
+
import{isRuntimeServer as e}from"@stryke/env/runtime-checks";import{useEffect as o,useLayoutEffect as t}from"react";export const useIsomorphicLayoutEffect=e?o:t;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stryke/hooks",
|
|
3
|
-
"version": "0.1
|
|
3
|
+
"version": "0.2.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "A package containing shared hooks that can be used in any React UI project",
|
|
6
6
|
"repository": {
|
|
@@ -23,8 +23,9 @@
|
|
|
23
23
|
"react": "^19.0.0",
|
|
24
24
|
"react-dom": "^19.0.0",
|
|
25
25
|
"react-native": "0.77.0",
|
|
26
|
-
"@stryke/
|
|
27
|
-
"@stryke/
|
|
26
|
+
"@stryke/env": ">=0.3.1",
|
|
27
|
+
"@stryke/helpers": ">=0.2.1",
|
|
28
|
+
"@stryke/types": ">=0.1.3"
|
|
28
29
|
},
|
|
29
30
|
"devDependencies": {
|
|
30
31
|
"@types/react": "^19.0.8",
|