TypeError: Cannot read property 'NumberFormat' of undefined in react-native app

Viewed 63

In my react-native app, I am using the new Intl.NumberFormat to display the amount.

const utilsCurrency = (value, code) => {
    const currency = code ? (new Intl.NumberFormat('en-US', { style: 'currency', currency: code, minimumFractionDigits: 2, maximumFractionDigits: 2 }).format(value)) : value; 
    return currency;
}

I am getting an error in my app TypeError: Cannot read property 'NumberFormat' of undefined how to fix this issue.

0 Answers
Related