How to use Intl.NumberFormat with react native?

本小妞迷上赌 提交于 2021-01-02 08:16:11

问题


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?


回答1:


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/



来源:https://stackoverflow.com/questions/52812751/how-to-use-intl-numberformat-with-react-native

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!