{"action":"opened","issue":{"url":"https://api.github.com/repos/facebook/flow/issues/1061","labels_url":"https://api.github.com/repos/facebook/flow/issues/1061/labels{/name}","comments_url":"https://api.github.com/repos/facebook/flow/issues/1061/comments","events_url":"https://api.github.com/repos/facebook/flow/issues/1061/events","html_url":"https://github.com/facebook/flow/issues/1061","id":115932789,"number":1061,"title":"Missing type check for JSX inside const","user":{"login":"majjoha","id":233988,"avatar_url":"https://avatars.githubusercontent.com/u/233988?v=3","gravatar_id":"","url":"https://api.github.com/users/majjoha","html_url":"https://github.com/majjoha","followers_url":"https://api.github.com/users/majjoha/followers","following_url":"https://api.github.com/users/majjoha/following{/other_user}","gists_url":"https://api.github.com/users/majjoha/gists{/gist_id}","starred_url":"https://api.github.com/users/majjoha/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/majjoha/subscriptions","organizations_url":"https://api.github.com/users/majjoha/orgs","repos_url":"https://api.github.com/users/majjoha/repos","events_url":"https://api.github.com/users/majjoha/events{/privacy}","received_events_url":"https://api.github.com/users/majjoha/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-11-09T18:07:24Z","updated_at":"2015-11-09T18:07:24Z","closed_at":null,"body":"I've been facing an issue recently where JSX inside a `const` isn't properly type checked as expected.\r\n\r\n```js\r\ntype TCounter = (props: {\r\n  value: number\r\n}) => ReactElement\r\nconst Counter: TCounter = ({ value }) => (\r\n  <div>{ value }</div>\r\n)\r\n\r\nconst SomeOtherComponent = () => (\r\n  Counter({ value: '4' })\r\n)\r\n\r\nconst SomeOtherComponent2 = () => (\r\n  <Counter value='4' />\r\n)\r\n```\r\n\r\nHere, `SomeOtherComponent` correctly tells me that there is an issue with the type of `value`, whereas `SomeOtherComponent2` incorrectly passes. Do I need some additional configuration to have Flow support this use case, is it a bug, or is this not supported by design?"}}