@react-hook/passive-layout-effect
Advanced tools
Comparing version 1.2.0 to 1.2.1
@@ -6,10 +6,8 @@ "use strict"; | ||
var React = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("react")); | ||
var _react = /*#__PURE__*/_interopRequireDefault( /*#__PURE__*/require("react")); | ||
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; } | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } | ||
const usePassiveLayoutEffect = React[typeof document !== 'undefined' && document.createElement !== void 0 ? 'useLayoutEffect' : 'useEffect']; | ||
const usePassiveLayoutEffect = _react.default[typeof document !== 'undefined' && document.createElement !== void 0 ? 'useLayoutEffect' : 'useEffect']; | ||
var _default = usePassiveLayoutEffect; | ||
exports.default = _default; |
@@ -1,3 +0,3 @@ | ||
import * as React from 'react'; | ||
import React from 'react'; | ||
const usePassiveLayoutEffect = React[typeof document !== 'undefined' && document.createElement !== void 0 ? 'useLayoutEffect' : 'useEffect']; | ||
export default usePassiveLayoutEffect; |
@@ -1,2 +0,2 @@ | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("react")):"function"==typeof define&&define.amd?define(["react"],t):(e=e||self).usePassiveLayoutEffect=t(e.React)}(this,(function(e){"use strict";return e["undefined"!=typeof document&&void 0!==document.createElement?"useLayoutEffect":"useEffect"]})); | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("react")):"function"==typeof define&&define.amd?define(["react"],t):(e=e||self).usePassiveLayoutEffect=t(e.React)}(this,(function(e){"use strict";return(e=e&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e)["undefined"!=typeof document&&void 0!==document.createElement?"useLayoutEffect":"useEffect"]})); | ||
//# sourceMappingURL=use-passive-layout-effect.js.map |
{ | ||
"name": "@react-hook/passive-layout-effect", | ||
"version": "1.2.0", | ||
"version": "1.2.1", | ||
"homepage": "https://github.com/jaredLunde/react-hook/tree/master/packages/passive-layout-effect#readme", | ||
@@ -117,3 +117,3 @@ "repository": "github:jaredLunde/react-hook", | ||
"lint-staged": "latest", | ||
"lundle": "latest", | ||
"lundle": "^0.4.9", | ||
"prettier": "latest", | ||
@@ -120,0 +120,0 @@ "react": "latest", |
@@ -15,2 +15,5 @@ <hr> | ||
</a> | ||
<a aria-label="Build status" href="https://travis-ci.com/jaredLunde/react-hook"> | ||
<img alt="Build status" src="https://img.shields.io/travis/com/jaredLunde/react-hook?style=for-the-badge&labelColor=24292e"> | ||
</a> | ||
<a aria-label="NPM version" href="https://www.npmjs.com/package/@react-hook/passive-layout-effect"> | ||
@@ -17,0 +20,0 @@ <img alt="NPM Version" src="https://img.shields.io/npm/v/@react-hook/passive-layout-effect?style=for-the-badge&labelColor=24292e"> |
@@ -1,2 +0,2 @@ | ||
import * as React from 'react' | ||
import React from 'react' | ||
declare const usePassiveLayoutEffect: | ||
@@ -3,0 +3,0 @@ | typeof React.useLayoutEffect |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
11237
17
57
49
0