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

How to implement shouldComponentUpdate when using ReactIntl #58

Closed
pselden opened this issue Jan 7, 2015 · 4 comments
Closed

How to implement shouldComponentUpdate when using ReactIntl #58

pselden opened this issue Jan 7, 2015 · 4 comments

Comments

@pselden
Copy link

pselden commented Jan 7, 2015

I'm not clear on how a component that uses ReactIntl.Mixin (or any of the new components) can implement shoulComponentUpdate. Am I able to get at the messages/locale/formats properties from inside a subcomponent of my app so that when I switch languages I can re-render the components that use these? When using PureRenderMixin it just never re-renders the components that use it at all.

Is this just a fundamental problem when passing down the locale props down with context or is there a way to solve it?

@caridy
Copy link
Collaborator

caridy commented Jan 13, 2015

TL;DR: do not use the context, be explicit thru props:
check this for more details: #39 (comment)

@slorber
Copy link

slorber commented Feb 27, 2015

@caridy this is not manageable for a very large app :(

@ericf
Copy link
Collaborator

ericf commented Apr 2, 2015

Related to this, we should also implement shouldComponentUpdate() within each of the React Intl components.

@ericf
Copy link
Collaborator

ericf commented Sep 11, 2015

See: #162

@ericf ericf closed this as completed Sep 11, 2015
longlho pushed a commit that referenced this issue Apr 27, 2020
Fix Travis CI badge to link directly to the current build
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants