{"action":"created","issue":{"url":"https://api.github.com/repos/facebook/react/issues/14019","repository_url":"https://api.github.com/repos/facebook/react","labels_url":"https://api.github.com/repos/facebook/react/issues/14019/labels{/name}","comments_url":"https://api.github.com/repos/facebook/react/issues/14019/comments","events_url":"https://api.github.com/repos/facebook/react/issues/14019/events","html_url":"https://github.com/facebook/react/issues/14019","id":374984685,"node_id":"MDU6SXNzdWUzNzQ5ODQ2ODU=","number":14019,"title":"useContext() not equivalent to Context.Consumer for shouldComponentUpdate","user":{"login":"nealeu","id":264594,"node_id":"MDQ6VXNlcjI2NDU5NA==","avatar_url":"https://avatars1.githubusercontent.com/u/264594?v=4","gravatar_id":"","url":"https://api.github.com/users/nealeu","html_url":"https://github.com/nealeu","followers_url":"https://api.github.com/users/nealeu/followers","following_url":"https://api.github.com/users/nealeu/following{/other_user}","gists_url":"https://api.github.com/users/nealeu/gists{/gist_id}","starred_url":"https://api.github.com/users/nealeu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nealeu/subscriptions","organizations_url":"https://api.github.com/users/nealeu/orgs","repos_url":"https://api.github.com/users/nealeu/repos","events_url":"https://api.github.com/users/nealeu/events{/privacy}","received_events_url":"https://api.github.com/users/nealeu/received_events","type":"User","site_admin":false},"labels":[{"id":620368407,"node_id":"MDU6TGFiZWw2MjAzNjg0MDc=","url":"https://api.github.com/repos/facebook/react/labels/Resolution:%20Needs%20More%20Information","name":"Resolution: Needs More Information","color":"fffde7","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2018-10-29T12:07:10Z","updated_at":"2018-11-05T00:57:41Z","closed_at":"2018-11-05T00:33:36Z","author_association":"NONE","body":"I think there's a bug in 16.7.0-alpha.0 unless this is intentional.\r\n\r\n**What is the expected behavior?**\r\nI've been using the context API to implement a dynamic loader where a parent component is responsible for triggering and loading some network data, and one or more grand-child components want to consume that data or show \"Loading...\" while that data is being fetched.\r\n\r\n**What is the current behavior?**\r\nWhen I migrated to useContext() I don't get a re-render, and can't quite see how this is going to come about.  \r\n\r\nCan you update examples to show dynamic behaviour, or if not supported to highlight that we will still need to use Context.Consumer for that.\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/facebook/react/issues/comments/435726026","html_url":"https://github.com/facebook/react/issues/14019#issuecomment-435726026","issue_url":"https://api.github.com/repos/facebook/react/issues/14019","id":435726026,"node_id":"MDEyOklzc3VlQ29tbWVudDQzNTcyNjAyNg==","user":{"login":"markerikson","id":1128784,"node_id":"MDQ6VXNlcjExMjg3ODQ=","avatar_url":"https://avatars1.githubusercontent.com/u/1128784?v=4","gravatar_id":"","url":"https://api.github.com/users/markerikson","html_url":"https://github.com/markerikson","followers_url":"https://api.github.com/users/markerikson/followers","following_url":"https://api.github.com/users/markerikson/following{/other_user}","gists_url":"https://api.github.com/users/markerikson/gists{/gist_id}","starred_url":"https://api.github.com/users/markerikson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/markerikson/subscriptions","organizations_url":"https://api.github.com/users/markerikson/orgs","repos_url":"https://api.github.com/users/markerikson/repos","events_url":"https://api.github.com/users/markerikson/events{/privacy}","received_events_url":"https://api.github.com/users/markerikson/received_events","type":"User","site_admin":false},"created_at":"2018-11-05T00:57:41Z","updated_at":"2018-11-05T00:57:41Z","author_association":"NONE","body":"@nealeu : were you running `useContext(MyContext)`, or `useContext(MyContext.Consumer)` ?  When I tried the latter, I found that my component received an _initial_ value, but did not get re-run when the context updated.  The React team has told me that this is actually a bug, in that passing only the consumer shouldn't work at _all_ - you should be passing the _entire_ context object."}}
{"actor":{"display_login":"markerikson"}}