heyman333 / react-animated-numbers

👾 Library showing animation of number changes in react.js
MIT License
242 stars 29 forks source link

includeCommas fails on certain i18n #34

Closed juliusmarminge closed 2 years ago

juliusmarminge commented 2 years ago

The new tRPC docs use react-animated-numbers for the Github stars:

CleanShot 2022-07-26 at 23 38 11

Problem is it should be 10k stars and not 100k :( so I dug into this and found that the includeComma option is extremely buggy and only seem to work on a select few browsers.

Here is a stackblitz reproduction example: https://stackblitz.com/edit/vitejs-vite-58iqih?file=src/App.tsx

I tested on Safari, Safari on iOS, Firefox and Chrome and got the same result on all. However someone in the community did see the correct star with the comma on both chroma:

image

We believe this may have to do with i18n where some use comma separation and some don't?