{"action":"closed","issue":{"url":"https://api.github.com/repos/thejameskyle/babel-react-optimize/issues/15","repository_url":"https://api.github.com/repos/thejameskyle/babel-react-optimize","labels_url":"https://api.github.com/repos/thejameskyle/babel-react-optimize/issues/15/labels{/name}","comments_url":"https://api.github.com/repos/thejameskyle/babel-react-optimize/issues/15/comments","events_url":"https://api.github.com/repos/thejameskyle/babel-react-optimize/issues/15/events","html_url":"https://github.com/thejameskyle/babel-react-optimize/issues/15","id":153073673,"number":15,"title":"Remove React.Component subclass when not using setState","user":{"login":"thejameskyle","id":952783,"avatar_url":"https://avatars.githubusercontent.com/u/952783?v=3","gravatar_id":"","url":"https://api.github.com/users/thejameskyle","html_url":"https://github.com/thejameskyle","followers_url":"https://api.github.com/users/thejameskyle/followers","following_url":"https://api.github.com/users/thejameskyle/following{/other_user}","gists_url":"https://api.github.com/users/thejameskyle/gists{/gist_id}","starred_url":"https://api.github.com/users/thejameskyle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thejameskyle/subscriptions","organizations_url":"https://api.github.com/users/thejameskyle/orgs","repos_url":"https://api.github.com/users/thejameskyle/repos","events_url":"https://api.github.com/users/thejameskyle/events{/privacy}","received_events_url":"https://api.github.com/users/thejameskyle/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-05-04T17:44:19Z","updated_at":"2016-05-04T18:06:16Z","closed_at":"2016-05-04T18:06:16Z","body":"There's no reason this component needs to extend `React.Component` because it does not use `setState`.\r\n\r\n```js\r\nclass Component extends React.Component {\r\n  componentDidMount() {\r\n    // ...\r\n  }\r\n  render() {\r\n    return <h1>Hello World</h1>;\r\n  }\r\n} \r\n```\r\n\r\nIt should be pretty safe to do:\r\n\r\n```diff\r\n- class Component extends React.Component {\r\n+ class Component {\r\n```"}}