{"action":"created","issue":{"url":"https://api.github.com/repos/reactjs/react-docgen/issues/183","repository_url":"https://api.github.com/repos/reactjs/react-docgen","labels_url":"https://api.github.com/repos/reactjs/react-docgen/issues/183/labels{/name}","comments_url":"https://api.github.com/repos/reactjs/react-docgen/issues/183/comments","events_url":"https://api.github.com/repos/reactjs/react-docgen/issues/183/events","html_url":"https://github.com/reactjs/react-docgen/issues/183","id":227716498,"number":183,"title":"Add support for defining PropTypes using ES6 static getter","user":{"login":"bsmith-cycorp","id":25161635,"avatar_url":"https://avatars3.githubusercontent.com/u/25161635?v=4","gravatar_id":"","url":"https://api.github.com/users/bsmith-cycorp","html_url":"https://github.com/bsmith-cycorp","followers_url":"https://api.github.com/users/bsmith-cycorp/followers","following_url":"https://api.github.com/users/bsmith-cycorp/following{/other_user}","gists_url":"https://api.github.com/users/bsmith-cycorp/gists{/gist_id}","starred_url":"https://api.github.com/users/bsmith-cycorp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bsmith-cycorp/subscriptions","organizations_url":"https://api.github.com/users/bsmith-cycorp/orgs","repos_url":"https://api.github.com/users/bsmith-cycorp/repos","events_url":"https://api.github.com/users/bsmith-cycorp/events{/privacy}","received_events_url":"https://api.github.com/users/bsmith-cycorp/received_events","type":"User","site_admin":false},"labels":[{"id":181650507,"url":"https://api.github.com/repos/reactjs/react-docgen/labels/bug","name":"bug","color":"fc2929","default":true}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":15,"created_at":"2017-05-10T15:19:09Z","updated_at":"2017-11-24T23:28:59Z","closed_at":"2017-10-11T00:39:48Z","author_association":"NONE","body":"With the new push for ES6 class syntax over the now-deprecated React.createClass(), this issue has become a little bit more relevant. ES6 classes don't (yet) support static data members without a `MyClass.myProp = ...` outside of the main class definition. They do, however, support static getters, but that would mean returning something like `propTypes` from a function.\r\n\r\nFor example:\r\n\r\n```\r\nclass MyComponent extends React.Component {\r\n\r\n  static get propTypes() {\r\n    return {\r\n      ...\r\n    }\r\n  }\r\n\r\n}\r\n```\r\nvs.\r\n```\r\nclass MyComponent extends React.Component {\r\n\r\n}\r\n\r\nMyComponent.propTypes = {\r\n  ...\r\n}\r\n```\r\n\r\nIt's not essential, but it would be really nice to be able to declare propTypes inside the ES6 class body and still have them be detected by react-docgen.\r\n\r\nIssue created by recommendation of @fkling in the discussion on #151"},"comment":{"url":"https://api.github.com/repos/reactjs/react-docgen/issues/comments/346906050","html_url":"https://github.com/reactjs/react-docgen/issues/183#issuecomment-346906050","issue_url":"https://api.github.com/repos/reactjs/react-docgen/issues/183","id":346906050,"user":{"login":"lensbart","id":20876627,"avatar_url":"https://avatars0.githubusercontent.com/u/20876627?v=4","gravatar_id":"","url":"https://api.github.com/users/lensbart","html_url":"https://github.com/lensbart","followers_url":"https://api.github.com/users/lensbart/followers","following_url":"https://api.github.com/users/lensbart/following{/other_user}","gists_url":"https://api.github.com/users/lensbart/gists{/gist_id}","starred_url":"https://api.github.com/users/lensbart/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lensbart/subscriptions","organizations_url":"https://api.github.com/users/lensbart/orgs","repos_url":"https://api.github.com/users/lensbart/repos","events_url":"https://api.github.com/users/lensbart/events{/privacy}","received_events_url":"https://api.github.com/users/lensbart/received_events","type":"User","site_admin":false},"created_at":"2017-11-24T23:28:59Z","updated_at":"2017-11-24T23:28:59Z","author_association":"NONE","body":"It does seem strange, but I thought it could be due to some dependency incompatibility which got resolved by yarn (I didn't look much further into it)"}}
{"actor":{"display_login":"lensbart"}}