Skip to content

Commit

Permalink
fix some issue
Browse files Browse the repository at this point in the history
  • Loading branch information
heyman333 committed May 15, 2022
1 parent c625483 commit ddb5527
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
8 changes: 5 additions & 3 deletions index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ const AnimatedNumber = ({
if (height) {
setNumberHeight(height);
}
}, [animateToNumber]);
}, [animateToNumber, fontStyle]);

return (
<>
Expand Down Expand Up @@ -94,7 +94,7 @@ const AnimatedNumber = ({
NUMBERS.map((number, i) => (
<animated.div
key={i}
style={{ ...props, ...fontStyle }}
style={{ ...fontStyle,...props }}
>
{number}
</animated.div>
Expand All @@ -117,4 +117,6 @@ const AnimatedNumber = ({
);
};

export default AnimatedNumber;
const Enhanced = React.memo(AnimatedNumber)

export default Enhanced;
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-animated-numbers",
"version": "0.11.0",
"version": "0.12.0",
"description": "Library showing animation of number changes in react.js",
"main": "./dist/index.js",
"files": [
Expand Down

0 comments on commit ddb5527

Please sign in to comment.