Despite my efforts to utilize intl
for formatting purposes, I consistently encounter the error message:
ReferenceError: No locale data has been provided for this object yet
I've experimented with various approaches such as:
new Intl.NumberFormat('en-ZA', { minimumFractionDigits: percentDecimals });
as well as
new Intl.NumberFormat(['en-ZA'], { minimumFractionDigits: percentDecimals });
but I'm at a loss for what else to try.
In order to address this issue, I have included the following in my package.json
:
"intl": "latest"
and made sure to import it in my code:
import Intl from "intl";