Im trying to convert a number to price format in react native. How to use https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/NumberFormat (Intl.NumberFormat) this with react native?
Asked
Active
Viewed 1.1k times
2 Answers
3
Looks like you need the international version of JSC: Android: https://github.com/react-native-community/jsc-android-buildscripts#international-variant
For iOS you'd need to use Intl.js polyfill https://github.com/andyearnshaw/Intl.js/

Long Ho
- 599
- 4
- 15
-
Is there any plugin available ? – Nithyanandan Sathiyanathan Oct 19 '21 at 09:10
-
you can use JS polyfill(for default JS engine on Android): https://gist.github.com/evasyuk/e05c230afa578fe42f95e4d8b004356f – evasyuk Jan 28 '22 at 21:36
-1
Simply install the intl package for expo building on android. Then you can use the Intl.NumberFormat as described in the Mozilla Docs.

aminator
- 396
- 7
- 18