{"action":"created","issue":{"url":"https://api.github.com/repos/yahoo/react-intl/issues/429","repository_url":"https://api.github.com/repos/yahoo/react-intl","labels_url":"https://api.github.com/repos/yahoo/react-intl/issues/429/labels{/name}","comments_url":"https://api.github.com/repos/yahoo/react-intl/issues/429/comments","events_url":"https://api.github.com/repos/yahoo/react-intl/issues/429/events","html_url":"https://github.com/yahoo/react-intl/pull/429","id":150080024,"number":429,"title":"Extended the nested providers example for #419.","user":{"login":"wrwrwr","id":1221991,"avatar_url":"https://avatars.githubusercontent.com/u/1221991?v=3","gravatar_id":"","url":"https://api.github.com/users/wrwrwr","html_url":"https://github.com/wrwrwr","followers_url":"https://api.github.com/users/wrwrwr/followers","following_url":"https://api.github.com/users/wrwrwr/following{/other_user}","gists_url":"https://api.github.com/users/wrwrwr/gists{/gist_id}","starred_url":"https://api.github.com/users/wrwrwr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wrwrwr/subscriptions","organizations_url":"https://api.github.com/users/wrwrwr/orgs","repos_url":"https://api.github.com/users/wrwrwr/repos","events_url":"https://api.github.com/users/wrwrwr/events{/privacy}","received_events_url":"https://api.github.com/users/wrwrwr/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-04-21T13:48:25Z","updated_at":"2016-04-23T22:46:03Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/yahoo/react-intl/pulls/429","html_url":"https://github.com/yahoo/react-intl/pull/429","diff_url":"https://github.com/yahoo/react-intl/pull/429.diff","patch_url":"https://github.com/yahoo/react-intl/pull/429.patch"},"body":"I've been trying to keep things simple and match the theme, so the example is somewhat artificial :-)\r\nThe `Container` and `Message` components could live in separate packages, and know little about namespaces defined or not defined in their parents (passing `getIntlMessages()` down seems to be a bit of unnecessary binding, and `getIntlFormats()` would also be needed). Containers within containers are not uncommon. The \"strings\" passed down could include some more complex content  (thus `FormattedHTMLMessage` could not be an option).\r\n\r\nA more practical scenario would be for the container to be a modal with some textual chrome elements, and instead of a message it could display some canvas / svg chart that would include content passed down from the app.\r\n\r\nTechnically, we have all elements in a tree, so everything can be done with nested providers. Just wrap each message in the proper provider and pull common providers to ancestors in one way or another. On the other hand, namespaces can be used thoughtlessly and no binding between components needs to be introduced (each component can declare and use its own namespace -- just for its own messages)."},"comment":{"url":"https://api.github.com/repos/yahoo/react-intl/issues/comments/213850092","html_url":"https://github.com/yahoo/react-intl/pull/429#issuecomment-213850092","issue_url":"https://api.github.com/repos/yahoo/react-intl/issues/429","id":213850092,"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-04-23T22:46:03Z","updated_at":"2016-04-23T22:46:03Z","body":"Added some comments back here: https://github.com/yahoo/react-intl/issues/419#issuecomment-213841978"}}