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?
React Native If you're using react-intl in React Native, make sure your runtime has built-in Intl support (similar to JSC International variant).
Usage. import NumberFormat from 'react-number-format'; //or import { default as NumberFormat } from 'react-number-format'; In typescript you also have to enable "esModuleInterop": true in your tsconfig. json (https://www.typescriptlang.org/docs/handbook/compiler-options.html).
The Intl.NumberFormat object enables language-sensitive number formatting.
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/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With