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?
How to use Intl.NumberFormat with react native?
Asked Answered
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/
Is there any plugin available ? –
Beefwitted
you can use JS polyfill(for default JS engine on Android): gist.github.com/evasyuk/e05c230afa578fe42f95e4d8b004356f –
Courtund
Simply install the intl package for expo building on android. Then you can use the Intl.NumberFormat as described in the Mozilla Docs.
© 2022 - 2024 — McMap. All rights reserved.