Use react-intl injectIntl() directly on component class(es)

Description

Use react-intl injectIntl() directly on component class(es) to avoid creation of anonymous functions in render().

The following are sketches of a couple of approaches.

Either a component with a name something like IntlContainer

  • Contains internationalization supports, messages, and current language state

  • App is its only child component

We can then use injectIntl() directly in App.js:

Or, move the localizable user interface out of App

  • App would contain internationalization supports, messages, current language state, and other application-wide state

  • Any UI that needs localization is in child components of App

In this model, App would contain the <IntlProvider> container (as now) and children would contain:

Resources

Activity

Show:
Done

Details

Assignee

Reporter

Fix versions

Created November 13, 2019 at 8:48 PM
Updated February 19, 2020 at 8:18 PM
Resolved February 19, 2020 at 8:18 PM