Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Attempted import error: 'addLocaleData' is not exported from 'react-intl'

It's return error when i try this code

react-intl version 3.1.6 && react version 16.9

import { IntlProvider, FormattedMessage , addLocaleData} from 'react-intl';
like image 902
Chi Bui Avatar asked Aug 13 '19 08:08

Chi Bui


1 Answers

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.

like image 102
Brian Avatar answered Sep 19 '22 13:09

Brian