Skip to content

Commit

Permalink
Fix bug so it works in Expo too
Browse files Browse the repository at this point in the history
  • Loading branch information
Reagankm committed Dec 11, 2024
1 parent 8ba23dc commit b933df5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
8 changes: 2 additions & 6 deletions src/AnimatedEllipsis.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ const AnimatedEllipsis: React.FC<Props> = ({
toValue: targetOpacityRef.current,
duration: animationDelay,
useNativeDriver: useNativeDriver,
}).start(() => animateDots(nextDot));
} as Animated.TimingAnimationConfig).start(() => animateDots(nextDot));
},
[
animationDelay,
Expand All @@ -93,10 +93,6 @@ const AnimatedEllipsis: React.FC<Props> = ({
};
}, [animateDots, numberOfDots]);

useEffect(() => {
dotOpacitiesRef.current = initializeDots(validatedNumberOfDots, minOpacity);
}, [numberOfDots, minOpacity]);

return (
<View style={styles.container}>
{dotOpacitiesRef.current.map((opacity, index) => (
Expand All @@ -109,7 +105,7 @@ const AnimatedEllipsis: React.FC<Props> = ({
</Animated.Text>
))}
</View>
) as React.JSX.Element;
) as React.ReactElement;
};

export default AnimatedEllipsis;

0 comments on commit b933df5

Please sign in to comment.