Attempted import error: 'addLocaleData' is not exported from 'react-intl'
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.
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.