score:15

Accepted answer

i'm still investigating but it looks like addlocaledata was removed as a breaking change for v3.

https://formatjs.io/docs/react-intl/upgrade-guide-3x

this was a bit confusing for me too because a lot of the tutorials and guides out there still use addlocaledata.

score:0

probably not the ideal solution but downgrading react-intl to ^2.8.0 is a quick and easy option.

score:1

the historical context is that react-intl was written back when intl.pluralrules & intl.relativetimeformat did not exist. fast forward to now, intl.pluralrules is officially in the intl js spec, and intl.relativetimeformat is stage 3 so we've changed the strategy for locale-data to polyfills instead on browsers that don't have those apis.


Related Query

More Query from same tag