{"action":"created","issue":{"url":"https://api.github.com/repos/facebook/relay/issues/1155","repository_url":"https://api.github.com/repos/facebook/relay","labels_url":"https://api.github.com/repos/facebook/relay/issues/1155/labels{/name}","comments_url":"https://api.github.com/repos/facebook/relay/issues/1155/comments","events_url":"https://api.github.com/repos/facebook/relay/issues/1155/events","html_url":"https://github.com/facebook/relay/pull/1155","id":155891181,"number":1155,"title":"Improve type definition for Higher Order Component","user":{"login":"nmn","id":3582514,"avatar_url":"https://avatars.githubusercontent.com/u/3582514?v=3","gravatar_id":"","url":"https://api.github.com/users/nmn","html_url":"https://github.com/nmn","followers_url":"https://api.github.com/users/nmn/followers","following_url":"https://api.github.com/users/nmn/following{/other_user}","gists_url":"https://api.github.com/users/nmn/gists{/gist_id}","starred_url":"https://api.github.com/users/nmn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nmn/subscriptions","organizations_url":"https://api.github.com/users/nmn/orgs","repos_url":"https://api.github.com/users/nmn/repos","events_url":"https://api.github.com/users/nmn/events{/privacy}","received_events_url":"https://api.github.com/users/nmn/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/facebook/relay/labels/CLA%20Signed","name":"CLA Signed","color":"009900"},{"url":"https://api.github.com/repos/facebook/relay/labels/GH%20Review:%20needs-revision","name":"GH Review: needs-revision","color":"e11d21"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":7,"created_at":"2016-05-20T05:42:20Z","updated_at":"2016-08-05T01:00:19Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/facebook/relay/pulls/1155","html_url":"https://github.com/facebook/relay/pull/1155","diff_url":"https://github.com/facebook/relay/pull/1155.diff","patch_url":"https://github.com/facebook/relay/pull/1155.patch"},"body":"WIP: I'll probably have to make more changes to make this work correctly. Creating the PR so I can get early feedback.\r\n\r\nThe community at large has not been able to property define types for higher-order components for a long time\r\n\r\nPropTypes on React Components are extremely important. They are perhaps, one of the most important types in a React App.\r\nHigher Order Components are extremely common in React Apps.\r\nTherefore, the fact that Higher Order Components eat the type definition of React Components is unacceptable.\r\n\r\nAfter days of research and trial and error, I've found the type definitions that work.\r\n\r\nThis PR, adds the 'correct' (* see footnote) type definitions for the HOC, so that when the time comes to publish the\r\nflow type definition file(s) to NPM, Relay.CreateContainer does not eat type definitions.\r\n\r\n* technically speaking, Relay.CreateContainer takes all the props that match fragment names and hydrates the values using ids.\r\nSo the types aren't completely correct, but it's close enough. Perhaps the return value should be something like:\r\n`React$Component<DefaultProps, Props & {[key: $Keys<FragmentObj>]:{__DATA_ID__: string}}, State>`"},"comment":{"url":"https://api.github.com/repos/facebook/relay/issues/comments/237729185","html_url":"https://github.com/facebook/relay/pull/1155#issuecomment-237729185","issue_url":"https://api.github.com/repos/facebook/relay/issues/1155","id":237729185,"user":{"login":"nmn","id":3582514,"avatar_url":"https://avatars.githubusercontent.com/u/3582514?v=3","gravatar_id":"","url":"https://api.github.com/users/nmn","html_url":"https://github.com/nmn","followers_url":"https://api.github.com/users/nmn/followers","following_url":"https://api.github.com/users/nmn/following{/other_user}","gists_url":"https://api.github.com/users/nmn/gists{/gist_id}","starred_url":"https://api.github.com/users/nmn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nmn/subscriptions","organizations_url":"https://api.github.com/users/nmn/orgs","repos_url":"https://api.github.com/users/nmn/repos","events_url":"https://api.github.com/users/nmn/events{/privacy}","received_events_url":"https://api.github.com/users/nmn/received_events","type":"User","site_admin":false},"created_at":"2016-08-05T01:00:19Z","updated_at":"2016-08-05T01:00:19Z","body":"@samwgoldman the ReactClass types don't actually work most of the time.  I'll try to see if it works now with flow 0.30"}}
{"actor":{"display_login":"nmn"}}