Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pass locale as key to IntlProvider to force a rerender on locale change #2072

Merged
merged 1 commit into from
Sep 16, 2018

Conversation

ochicf
Copy link
Contributor

@ochicf ochicf commented Sep 15, 2018

See docs: https://github.com/yahoo/react-intl/wiki/Components#dynamic-language-selection

The main problem is that optimization with shouldComponentUpdate prevents nested components from updating through context, hence all components below a component that does not rerender won't rerender on locale change.

@SachaG SachaG merged commit fdcdea9 into VulcanJS:devel Sep 16, 2018
@SachaG
Copy link
Contributor

SachaG commented Sep 16, 2018

Thanks!

@ochicf ochicf deleted the fix/locale-change branch September 16, 2018 14:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants