Skip to content

How to implement shouldComponentUpdate when using ReactIntl #58

Closed

Description

@pselden

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?

Activity

  1. caridy commented on Jan 13, 2015

    @caridy
    Collaborator

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

  2. slorber commented on Feb 27, 2015

    @slorber

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

  3. ericf commented on Apr 2, 2015

    @ericf
    Collaborator

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

  4. ericf commented on Sep 11, 2015

    @ericf
    Collaborator

    See: #162

  5. added a commit that references this issue on Apr 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions