React Native does not format large numbers with "," as thousand separators when using toLocaleString('en-us'). The same problem is observed on both Android and iOS versions.
I am working on a simple calculator app for Android and iOS. I previously created a similar model for web (plain javaScript) and made it work. However, since I ported it to React Native, the resulting calculation will no longer have thousand separators. My React Native demo can be found here:
https://snack.expo.io/@leourushi/calculator-tolocalestring
An example of my calculation function:
text1: ( b/ ((c/100) + 1) ).toLocaleString('en-US')
As you can see, I've added toLocaleString() method at the end of the calculation. But when the result is returned, it will not have "," as thousand separator.
Is toLocaleString() function not supported in React Native?