styled-jsx
Advanced tools
Comparing version 5.0.0-beta.2 to 5.0.0-beta.3
@@ -6,3 +6,3 @@ "use strict"; | ||
var _react = require("react"); | ||
var _react = _interopRequireDefault(require("react")); | ||
@@ -13,2 +13,8 @@ var _stylesheetRegistry = require("./stylesheet-registry"); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } | ||
// Opt-into the new `useInsertionEffect` API in React 18, fallback to `useLayoutEffect`. | ||
// https://github.com/reactwg/react-18/discussions/110 | ||
var useInsertionEffect = _react["default"].useInsertionEffect || _react["default"].useLayoutEffect; | ||
function JSXStyle(props) { | ||
@@ -26,3 +32,3 @@ var registry = (0, _stylesheetRegistry.useStyleRegistry)(); // If `registry` does not exist, we do nothing here. | ||
(0, _react.useLayoutEffect)(function () { | ||
useInsertionEffect(function () { | ||
registry.add(props); | ||
@@ -29,0 +35,0 @@ return function () { |
{ | ||
"name": "styled-jsx", | ||
"version": "5.0.0-beta.2", | ||
"version": "5.0.0-beta.3", | ||
"license": "MIT", | ||
@@ -5,0 +5,0 @@ "repository": "vercel/styled-jsx", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
104945
1683