You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Updated the other day to version 3.1.3 and noticed this immediately. Switching from initial state to a different value (locale: 'en' -> locale: 'es') works fine. All my useIntl hooks are being updated. Switching BACK from (locale: 'es' -> locale: 'en') does not cause a re-render in any of those components.
I re-installed version 3.1.2 and verified the issue no longer occurs. Suspect it is an issue with the caching bug fixes made in 3.1.3
Expected behavior
Changing locale property on IntlProvider triggers all useIntl() hook consumers to update.
Current behavior
Switching the first time works perfectly. Any subsequent switches back to a previously used locale does nothing.
Step to reproduce for BUG REPORT
Create an IntlProvider and pass it a locale value ( from a simple state object ). Change the state (using setState) and verify the locale is changed in a child component which uses useIntl(). Change the state back to the initial state and verify the child components do not re-render with the updated intl object.
Your Environment
Executable
Version
npm ls react-intl
3.1.5
npm ls react
16.9
npm --version
6.4.1
node --version
10.15.3
| OS | Version |
| Windows 10 | ------- |
| Browser | Version |
| Chrome | 75.0.3770.142 |
The text was updated successfully, but these errors were encountered:
Updated the other day to version 3.1.3 and noticed this immediately. Switching from initial state to a different value (locale: 'en' -> locale: 'es') works fine. All my useIntl hooks are being updated. Switching BACK from (locale: 'es' -> locale: 'en') does not cause a re-render in any of those components.
I re-installed version 3.1.2 and verified the issue no longer occurs. Suspect it is an issue with the caching bug fixes made in 3.1.3
Expected behavior
Changing locale property on IntlProvider triggers all useIntl() hook consumers to update.
Current behavior
Switching the first time works perfectly. Any subsequent switches back to a previously used locale does nothing.
Step to reproduce for BUG REPORT
Create an IntlProvider and pass it a locale value ( from a simple state object ). Change the state (using setState) and verify the locale is changed in a child component which uses useIntl(). Change the state back to the initial state and verify the child components do not re-render with the updated intl object.
Your Environment
npm ls react-intl
npm ls react
npm --version
node --version
| OS | Version |
| Windows 10 | ------- |
| Browser | Version |
| Chrome | 75.0.3770.142 |
The text was updated successfully, but these errors were encountered: