Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
...options,
},
})
if (whileTap || whileHover) {
useWhileInteraction({
ref,
animateToFrame,
from: to,
whileHover,
whileTap,
})
}
// Deep compare the `animate|to` @Frame so that we can animate updates.
useDeepCompareEffectNoCheck(() => {
if (!mountRef.current) {
animateToFrame(to, true)
mountRef.current = true
return
}
if (!isVisible && exit) {
animateToFrame(exit, true)
} else {
if (isExiting) return
animateToFrame(to, true)
}
visibilityRef.current = isVisible
}, [isVisible, to])