react-animated-numbers icon indicating copy to clipboard operation
react-animated-numbers copied to clipboard

Multiple Bugs - please see stackblitz example

Open 4Michael1Angelo5 opened this issue 8 months ago • 1 comments

  1. 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.

  2. 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

4Michael1Angelo5 avatar Jun 19 '24 19:06 4Michael1Angelo5