I got this error, when i try to format the currency value.
type CurrencyState = {
...,
initialValue: [number | string, string];
}
let formatedValue = this.state.initialValue;
if (typeof formatedValue === 'string'){
formatedValue = parseInt(formatedValue)
}
formatedValue = Intl.NumberFormat("en", { style: "decimal", minimumFractionDigits: 2 }).format(formatedValue );
number | string, not[number | string, string].initialValueis array but you try to setnumber