{"action":"created","issue":{"url":"https://api.github.com/repos/yahoo/react-intl/issues/585","repository_url":"https://api.github.com/repos/yahoo/react-intl","labels_url":"https://api.github.com/repos/yahoo/react-intl/issues/585/labels{/name}","comments_url":"https://api.github.com/repos/yahoo/react-intl/issues/585/comments","events_url":"https://api.github.com/repos/yahoo/react-intl/issues/585/events","html_url":"https://github.com/yahoo/react-intl/issues/585","id":170842118,"number":585,"title":"FormattedMessage vs formatMessage - re-rendering ?","user":{"login":"amangeot","id":7119159,"avatar_url":"https://avatars.githubusercontent.com/u/7119159?v=3","gravatar_id":"","url":"https://api.github.com/users/amangeot","html_url":"https://github.com/amangeot","followers_url":"https://api.github.com/users/amangeot/followers","following_url":"https://api.github.com/users/amangeot/following{/other_user}","gists_url":"https://api.github.com/users/amangeot/gists{/gist_id}","starred_url":"https://api.github.com/users/amangeot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amangeot/subscriptions","organizations_url":"https://api.github.com/users/amangeot/orgs","repos_url":"https://api.github.com/users/amangeot/repos","events_url":"https://api.github.com/users/amangeot/events{/privacy}","received_events_url":"https://api.github.com/users/amangeot/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/yahoo/react-intl/labels/question","name":"question","color":"cc317c"}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":7,"created_at":"2016-08-12T10:22:30Z","updated_at":"2016-09-02T17:41:38Z","closed_at":"2016-08-23T15:28:07Z","body":"Hello,\r\nI have been using `formatMessage`, wrapping my components with `injectIntl` . This way when the locale changes, the component updates itself and its message translations:\r\n\r\n```<SomeLink to='/login' title={this.props.intl.formatMessage(login)} />```\r\n\r\nI just tried moving to `FormattedMessage`, removing `injectIntl`, but this way the component doesn't re-render when the locale changes:\r\n\r\n```<SomeLink to='/login' title={<FormattedMessage {...login} />} />```\r\n\r\nIs it possible to use `FormattedMessage` without `injectIntl` and still having the `FormattedMessage` update themselves when locale changes ?\r\n________________\r\n\r\nThis is how I setup `IntlProvider` in my redux app:\r\n\r\n```\r\nexport const AppContainer = ({ store, history, routes, locale, messages }) => (\r\n  <Provider store={store}>\r\n    <IntlProvider locale={locale} messages={messages}>\r\n      <MuiThemeProvider muiTheme={getMuiTheme(tealBaseTheme)}>\r\n        <div style={{ height: '100%' }}>\r\n          <Router history={history} children={routes} onUpdate={logPageView} />\r\n        </div>\r\n      </MuiThemeProvider>\r\n    </IntlProvider>\r\n  </Provider>\r\n)\r\n```"},"comment":{"url":"https://api.github.com/repos/yahoo/react-intl/issues/comments/244441213","html_url":"https://github.com/yahoo/react-intl/issues/585#issuecomment-244441213","issue_url":"https://api.github.com/repos/yahoo/react-intl/issues/585","id":244441213,"user":{"login":"ericf","id":29096,"avatar_url":"https://avatars.githubusercontent.com/u/29096?v=3","gravatar_id":"","url":"https://api.github.com/users/ericf","html_url":"https://github.com/ericf","followers_url":"https://api.github.com/users/ericf/followers","following_url":"https://api.github.com/users/ericf/following{/other_user}","gists_url":"https://api.github.com/users/ericf/gists{/gist_id}","starred_url":"https://api.github.com/users/ericf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ericf/subscriptions","organizations_url":"https://api.github.com/users/ericf/orgs","repos_url":"https://api.github.com/users/ericf/repos","events_url":"https://api.github.com/users/ericf/events{/privacy}","received_events_url":"https://api.github.com/users/ericf/received_events","type":"User","site_admin":false},"created_at":"2016-09-02T17:41:38Z","updated_at":"2016-09-02T17:41:38Z","body":"@amangeot did that fix the issue? (I really hope this is fixed in React 16)"}}
{"actor":{"display_login":"ericf"}}