{"action":"closed","issue":{"url":"https://api.github.com/repos/facebook/flow/issues/3187","repository_url":"https://api.github.com/repos/facebook/flow","labels_url":"https://api.github.com/repos/facebook/flow/issues/3187/labels{/name}","comments_url":"https://api.github.com/repos/facebook/flow/issues/3187/comments","events_url":"https://api.github.com/repos/facebook/flow/issues/3187/events","html_url":"https://github.com/facebook/flow/issues/3187","id":200742204,"number":3187,"title":"Functional React components - HOC - Unexpected identifier","user":{"login":"szagi3891","id":859451,"avatar_url":"https://avatars0.githubusercontent.com/u/859451?v=3","gravatar_id":"","url":"https://api.github.com/users/szagi3891","html_url":"https://github.com/szagi3891","followers_url":"https://api.github.com/users/szagi3891/followers","following_url":"https://api.github.com/users/szagi3891/following{/other_user}","gists_url":"https://api.github.com/users/szagi3891/gists{/gist_id}","starred_url":"https://api.github.com/users/szagi3891/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/szagi3891/subscriptions","organizations_url":"https://api.github.com/users/szagi3891/orgs","repos_url":"https://api.github.com/users/szagi3891/repos","events_url":"https://api.github.com/users/szagi3891/events{/privacy}","received_events_url":"https://api.github.com/users/szagi3891/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2017-01-13T22:02:01Z","updated_at":"2017-03-08T20:50:25Z","closed_at":"2017-03-08T20:50:25Z","body":"The following code\r\n\r\n```\r\ntype TestPropsType = {\r\n    title: string,\r\n    context: string,\r\n};\r\n\r\ntype Test2PropsType = {\r\n    title: string\r\n};\r\n\r\ntype ComponentType<T> = (props: T) => React.Element<*>;\r\n\r\nfunction MakeHOC<T1, T2>(context: string, In: ComponentType<T1>): ComponentType<T2> => {\r\n    return (props: T2): React.Element<*> => {\r\n        return (\r\n            <In\r\n                title={props.title}\r\n                context={context}\r\n            />\r\n        );\r\n    };\r\n}\r\n\r\nconst Test = (props: TestPropsType): React.Element<*> => {\r\n    return (\r\n        <div>\r\n            {props.title} - {props.context}\r\n        </div>\r\n    );\r\n};\r\n\r\n....\r\n\r\nrender() {\r\n    const Test2 = MakeHOC(\"simple content\", Test);\r\n    return (\r\n        <Test2 title=\"simple title\" />\r\n    );\r\n}\r\n```\r\n\r\ngenerates errors:\r\n\r\n```\r\n 95:                 title={props.title}\r\n                     ^^^^^ Unexpected identifier\r\n```\r\n\r\nIt seems to me that should not be notified of these errors."}}
{"actor":{"display_login":"nmn"}}