react-animated-numbers
react-animated-numbers copied to clipboard
Multiple Bugs - please see stackblitz example
-
calling setNum() after the first render results in the next setNum call not animating to the correct number if first setNum(number) = this.state.number. IE initialize with number state = 1954, then call setNum(1954), next setNum() call will not animate and instead show all zeros.
-
State updates to sibling components result in animated numbers going to zero. This error can also be reproduced if rendering a sibling component conditionally (Not just conditionally modifying the style).
example: https://stackblitz.com/edit/vitejs-vite-p9hrid?file=src%2FApp.jsx