collapsible-react-component
Advanced tools
Comparing version 3.0.3 to 3.0.4
import { jsx } from 'react/jsx-runtime'; | ||
import { useRef, useCallback } from 'react'; | ||
import { useRef, useReducer, useCallback } from 'react'; | ||
import styles from './Collapsible.module.css.js'; | ||
@@ -13,2 +13,5 @@ import { revealTypes } from './revealTypes.js'; | ||
var stateRef = useRef({ open: open, transitioning: false }); | ||
var _d = useReducer(function (counter) { | ||
return counter + 1; | ||
}, 0), forceRender = _d[1]; | ||
if (lastOpenRef.current !== open) { | ||
@@ -28,2 +31,3 @@ lastOpenRef.current = open; | ||
stateRef.current = { open: open, transitioning: false }; | ||
forceRender(); | ||
} | ||
@@ -30,0 +34,0 @@ }, [open, onTransitionEnd]); |
{ | ||
"name": "collapsible-react-component", | ||
"version": "3.0.3", | ||
"version": "3.0.4", | ||
"description": "Collapses and expands content with an animation.", | ||
@@ -5,0 +5,0 @@ "type": "module", |
Sorry, the diff of this file is not supported yet
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
15735
121