Socket
Socket
Sign inDemoInstall

rc-motion

Package Overview
Dependencies
Maintainers
3
Versions
43
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rc-motion - npm Package Compare versions

Comparing version 2.3.1 to 2.3.2

9

es/hooks/useStatus.js

@@ -51,3 +51,4 @@ import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";

var mountedRef = useRef(false);
var deadlineRef = useRef(null); // =========================== Dom Node ===========================
var deadlineRef = useRef(null);
var destroyedRef = useRef(false); // =========================== Dom Node ===========================

@@ -82,5 +83,6 @@ var cacheElementRef = useRef(null);

canEnd = onLeaveEnd === null || onLeaveEnd === void 0 ? void 0 : onLeaveEnd(element, event);
}
} // Only update status when `canEnd` and not destroyed
if (canEnd !== false) {
if (canEnd !== false && !destroyedRef.current) {
setStatus(STATUS_NONE);

@@ -201,2 +203,3 @@ setStyle(null);

clearTimeout(deadlineRef.current);
destroyedRef.current = true;
};

@@ -203,0 +206,0 @@ }, []); // Trigger `onVisibleChanged`

@@ -70,3 +70,4 @@ "use strict";

var mountedRef = (0, React.useRef)(false);
var deadlineRef = (0, React.useRef)(null); // =========================== Dom Node ===========================
var deadlineRef = (0, React.useRef)(null);
var destroyedRef = (0, React.useRef)(false); // =========================== Dom Node ===========================

@@ -101,5 +102,6 @@ var cacheElementRef = (0, React.useRef)(null);

canEnd = onLeaveEnd === null || onLeaveEnd === void 0 ? void 0 : onLeaveEnd(element, event);
}
} // Only update status when `canEnd` and not destroyed
if (canEnd !== false) {
if (canEnd !== false && !destroyedRef.current) {
setStatus(_interface.STATUS_NONE);

@@ -220,2 +222,3 @@ setStyle(null);

clearTimeout(deadlineRef.current);
destroyedRef.current = true;
};

@@ -222,0 +225,0 @@ }, []); // Trigger `onVisibleChanged`

{
"name": "rc-motion",
"version": "2.3.1",
"version": "2.3.2",
"description": "React lifecycle controlled motion library",

@@ -5,0 +5,0 @@ "keywords": [

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc