@react-spring/animated
Advanced tools
Comparing version 9.4.4 to 9.4.5-beta.0
@@ -301,10 +301,10 @@ 'use strict'; | ||
shared.useLayoutEffect(() => { | ||
const lastObserver = observerRef.current; | ||
observerRef.current = observer; | ||
shared.each(deps, dep => shared.addFluidObserver(dep, observer)); | ||
if (lastObserver) { | ||
shared.each(lastObserver.deps, dep => shared.removeFluidObserver(dep, lastObserver)); | ||
shared.raf.cancel(lastObserver.update); | ||
} | ||
return () => { | ||
if (observerRef.current) { | ||
shared.each(observerRef.current.deps, dep => shared.removeFluidObserver(dep, observerRef.current)); | ||
shared.raf.cancel(observerRef.current.update); | ||
} | ||
}; | ||
}); | ||
@@ -311,0 +311,0 @@ React.useEffect(callback, []); |
@@ -301,10 +301,10 @@ 'use strict'; | ||
shared.useLayoutEffect(() => { | ||
const lastObserver = observerRef.current; | ||
observerRef.current = observer; | ||
shared.each(deps, dep => shared.addFluidObserver(dep, observer)); | ||
if (lastObserver) { | ||
shared.each(lastObserver.deps, dep => shared.removeFluidObserver(dep, lastObserver)); | ||
shared.raf.cancel(lastObserver.update); | ||
} | ||
return () => { | ||
if (observerRef.current) { | ||
shared.each(observerRef.current.deps, dep => shared.removeFluidObserver(dep, observerRef.current)); | ||
shared.raf.cancel(observerRef.current.update); | ||
} | ||
}; | ||
}); | ||
@@ -311,0 +311,0 @@ React.useEffect(callback, []); |
@@ -276,10 +276,10 @@ import { defineHidden, is, createInterpolator, eachProp, hasFluidValue, getFluidValue, each, isAnimatedString, useForceUpdate, useLayoutEffect, addFluidObserver, removeFluidObserver, raf, useOnce } from '@react-spring/shared'; | ||
useLayoutEffect(() => { | ||
const lastObserver = observerRef.current; | ||
observerRef.current = observer; | ||
each(deps, dep => addFluidObserver(dep, observer)); | ||
if (lastObserver) { | ||
each(lastObserver.deps, dep => removeFluidObserver(dep, lastObserver)); | ||
raf.cancel(lastObserver.update); | ||
} | ||
return () => { | ||
if (observerRef.current) { | ||
each(observerRef.current.deps, dep => removeFluidObserver(dep, observerRef.current)); | ||
raf.cancel(observerRef.current.update); | ||
} | ||
}; | ||
}); | ||
@@ -286,0 +286,0 @@ useEffect(callback, []); |
{ | ||
"name": "@react-spring/animated", | ||
"version": "9.4.4", | ||
"version": "9.4.5-beta.0", | ||
"description": "Animated component props for React", | ||
@@ -31,8 +31,8 @@ "main": "dist/react-spring-animated.cjs.js", | ||
"dependencies": { | ||
"@react-spring/shared": "~9.4.4", | ||
"@react-spring/types": "~9.4.4" | ||
"@react-spring/shared": "~9.4.5-beta.0", | ||
"@react-spring/types": "~9.4.5-beta.0" | ||
}, | ||
"peerDependencies": { | ||
"react": "^16.8.0 || ^17.0.0" | ||
"react": "^16.8.0 || >=17.0.0 || >=18.0.0" | ||
} | ||
} |
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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
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
36266
1107
1
+ Addedreact@18.3.1(transitive)
- Removedobject-assign@4.1.1(transitive)
- Removedreact@17.0.2(transitive)