10

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?

m9m9m
  • 1,655
  • 3
  • 21
  • 41

2 Answers2

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