{"action":"opened","issue":{"url":"https://api.github.com/repos/facebook/flow/issues/1777","repository_url":"https://api.github.com/repos/facebook/flow","labels_url":"https://api.github.com/repos/facebook/flow/issues/1777/labels{/name}","comments_url":"https://api.github.com/repos/facebook/flow/issues/1777/comments","events_url":"https://api.github.com/repos/facebook/flow/issues/1777/events","html_url":"https://github.com/facebook/flow/issues/1777","id":154438666,"number":1777,"title":"Can't seem to apply prop constraints via ReactClass<>","user":{"login":"glenjamin","id":151272,"avatar_url":"https://avatars.githubusercontent.com/u/151272?v=3","gravatar_id":"","url":"https://api.github.com/users/glenjamin","html_url":"https://github.com/glenjamin","followers_url":"https://api.github.com/users/glenjamin/followers","following_url":"https://api.github.com/users/glenjamin/following{/other_user}","gists_url":"https://api.github.com/users/glenjamin/gists{/gist_id}","starred_url":"https://api.github.com/users/glenjamin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/glenjamin/subscriptions","organizations_url":"https://api.github.com/users/glenjamin/orgs","repos_url":"https://api.github.com/users/glenjamin/repos","events_url":"https://api.github.com/users/glenjamin/events{/privacy}","received_events_url":"https://api.github.com/users/glenjamin/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-05-12T09:36:48Z","updated_at":"2016-05-12T09:36:48Z","closed_at":null,"body":"I'm trying to specify the type of components I'm importing from a module, have reduced down to this simple case:\r\n\r\nThis correctly fails the type check due to missing prop\r\n```jsx\r\n/* @flow */\r\n/* eslint-env browser */\r\nimport React from \"react\";\r\nimport ReactDOM from \"react-dom\";\r\n\r\nclass App extends React.Component {\r\n  props: { required: mixed };\r\n}\r\n\r\nReactDOM.render(\r\n  <App />,\r\n  document.getElementById(\"app\")\r\n);\r\n\r\n// temp.js:7\r\n//   7:   props: { required: mixed };\r\n//               ^^^^^^^^^^^^^^^^^^^ property `required`. Property not found in\r\n//  11:   <App />,\r\n//        ^^^^^^^ props of React element `App`\r\n```\r\n\r\nThis next example simulates applying a type to a foreign component, it does not error:\r\n```jsx\r\n/* @flow */\r\n/* eslint-env browser */\r\nimport React from \"react\";\r\nimport ReactDOM from \"react-dom\";\r\n\r\nclass App extends React.Component {\r\n  props: { required: mixed };\r\n}\r\nconst App2: any = App;\r\nconst App3: ReactClass<{required: mixed}> = App2;\r\n\r\nReactDOM.render(\r\n  <App3 />,\r\n  document.getElementById(\"app\")\r\n);\r\n```"}}