diff --git a/package.json b/package.json index ac98b4e..8dc3db5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@reagankm/rn-animated-ellipsis", - "version": "2.2.11", + "version": "3.0.0", "description": "An updated version of rn-animated-ellipsis, a simple, customizable animated dots component ideal for loading screens in React Native apps.", "main": "./dist/index.js", "types": "./dist/index.d.ts", diff --git a/src/AnimatedEllipsis.tsx b/src/AnimatedEllipsis.tsx index e27ed2c..da814d7 100644 --- a/src/AnimatedEllipsis.tsx +++ b/src/AnimatedEllipsis.tsx @@ -71,7 +71,7 @@ const AnimatedEllipsis: React.FC = ({ toValue: targetOpacityRef.current, duration: animationDelay, useNativeDriver: useNativeDriver, - }).start(() => animateDots(nextDot)); + } as Animated.TimingAnimationConfig).start(() => animateDots(nextDot)); }, [ animationDelay, @@ -93,10 +93,6 @@ const AnimatedEllipsis: React.FC = ({ }; }, [animateDots, numberOfDots]); - useEffect(() => { - dotOpacitiesRef.current = initializeDots(validatedNumberOfDots, minOpacity); - }, [numberOfDots, minOpacity]); - return ( {dotOpacitiesRef.current.map((opacity, index) => ( @@ -109,7 +105,7 @@ const AnimatedEllipsis: React.FC = ({ ))} - ) as React.JSX.Element; + ) as React.ReactElement; }; export default AnimatedEllipsis;