react-dev-inspector
Version:
dev-tool for inspect react components and jump to local IDE for component code.
11 lines (10 loc) • 457 B
JavaScript
;
var _a;
Object.defineProperty(exports, "__esModule", { value: true });
exports.useLayoutEffect = void 0;
const react_1 = require("react");
exports.useLayoutEffect = (typeof window !== 'undefined'
// @ts-expect-error `window` is not available in SSR
&& ((_a = window === null || window === void 0 ? void 0 : window.document) === null || _a === void 0 ? void 0 : _a.createElement))
? react_1.useLayoutEffect
: react_1.useEffect;