Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

use-isomorphic-layout-effect

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

use-isomorphic-layout-effect - npm Package Compare versions

Comparing version 1.1.2 to 1.2.0

dist/use-isomorphic-layout-effect.browser.cjs.default.js

0

dist/declarations/src/index.d.ts
import { useLayoutEffect } from 'react';
declare const _default: typeof useLayoutEffect;
export default _default;

4

dist/use-isomorphic-layout-effect.browser.cjs.js

@@ -7,4 +7,4 @@ 'use strict';

var index = react.useLayoutEffect ;
var index = react.useLayoutEffect ;
exports.default = index;
exports["default"] = index;
import { useLayoutEffect } from 'react';
var index = useLayoutEffect ;
var index = useLayoutEffect ;
export default index;
export { index as default };

@@ -1,2 +0,3 @@

export * from "./declarations/src/index";
export { default } from "./declarations/src/index";
export * from "./declarations/src/index.js";
export { default } from "./declarations/src/index.js";
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidXNlLWlzb21vcnBoaWMtbGF5b3V0LWVmZmVjdC5janMuZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4vZGVjbGFyYXRpb25zL3NyYy9pbmRleC5kLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBIn0=
'use strict';
if (process.env.NODE_ENV === "production") {
module.exports = require("./use-isomorphic-layout-effect.cjs.prod.js");
} else {
module.exports = require("./use-isomorphic-layout-effect.cjs.dev.js");
}
Object.defineProperty(exports, '__esModule', { value: true });
var react = require('react');
var isClient = typeof document !== 'undefined';
var index = isClient ? react.useLayoutEffect : react.useEffect;
exports["default"] = index;
import { useLayoutEffect, useEffect } from 'react';
var index = typeof document !== 'undefined' ? useLayoutEffect : useEffect;
var isClient = typeof document !== 'undefined';
export default index;
var index = isClient ? useLayoutEffect : useEffect;
export { index as default };
{
"name": "use-isomorphic-layout-effect",
"version": "1.1.2",
"version": "1.2.0",
"description": "A React helper hook for scheduling a layout effect with a fallback to a regular effect for environments where layout effects should not be used (such as server-side rendering).",
"main": "dist/use-isomorphic-layout-effect.cjs.js",
"module": "dist/use-isomorphic-layout-effect.esm.js",
"react-native": "./dist/use-isomorphic-layout-effect.native.esm.js",
"react-native": "./dist/use-isomorphic-layout-effect.browser.esm.js",
"browser": {
"./dist/use-isomorphic-layout-effect.cjs.js": "./dist/use-isomorphic-layout-effect.browser.cjs.js",
"./dist/use-isomorphic-layout-effect.esm.js": "./dist/use-isomorphic-layout-effect.browser.esm.js"
},
"types": "./dist/use-isomorphic-layout-effect.cjs.d.ts",
"exports": {
".": {
"types": {
"import": "./dist/use-isomorphic-layout-effect.cjs.mjs",
"default": "./dist/use-isomorphic-layout-effect.cjs.js"
},
"browser": {
"module": "./dist/use-isomorphic-layout-effect.browser.esm.js",
"import": "./dist/use-isomorphic-layout-effect.browser.cjs.mjs",
"default": "./dist/use-isomorphic-layout-effect.browser.cjs.js"
},
"react-native": {
"module": "./dist/use-isomorphic-layout-effect.browser.esm.js",
"import": "./dist/use-isomorphic-layout-effect.browser.cjs.mjs",
"default": "./dist/use-isomorphic-layout-effect.browser.cjs.js"
},
"module": "./dist/use-isomorphic-layout-effect.esm.js",
"import": "./dist/use-isomorphic-layout-effect.cjs.mjs",
"default": "./dist/use-isomorphic-layout-effect.cjs.js"
},
"./package.json": "./package.json"
},
"imports": {
"#is-client": {
"react-native": "./src/conditions/true.ts",
"browser": "./src/conditions/true.ts",
"default": "./src/conditions/is-client.ts"
}
},
"files": [

@@ -18,3 +47,2 @@ "dist"

"build": "preconstruct build",
"postbuild": "cpy 'src/index.native.ts' . --rename=$npm_package_react_native",
"prepare": "npm run build"

@@ -32,3 +60,3 @@ },

"peerDependencies": {
"react": "^16.8.0 || ^17.0.0 || ^18.0.0"
"react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0"
},

@@ -41,14 +69,22 @@ "peerDependenciesMeta": {

"devDependencies": {
"@babel/core": "^7.10.4",
"@babel/preset-env": "^7.10.4",
"@babel/preset-typescript": "^7.10.4",
"@preconstruct/cli": "1.1.14",
"@types/react": "^16.9.41",
"@babel/core": "^7.26.0",
"@babel/preset-env": "^7.26.0",
"@babel/preset-typescript": "^7.26.0",
"@preconstruct/cli": "^2.8.10",
"@types/react": "^19.0.0",
"cpy-cli": "^3.1.1",
"husky": "^4.2.5",
"lint-staged": "^10.2.11",
"prettier": "^2.0.5",
"react": "^16.13.1",
"typescript": "^3.9.5"
"prettier": "^3.4.2",
"react": "^19.0.0",
"typescript": "^5.7.2"
},
"preconstruct": {
"exports": {
"importConditionDefaultExport": "default"
},
"___experimentalFlags_WILL_CHANGE_IN_PATCH": {
"importsConditions": true
}
}
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc