{"action":"created","issue":{"url":"https://api.github.com/repos/thejameskyle/babel-react-optimize/issues/22","repository_url":"https://api.github.com/repos/thejameskyle/babel-react-optimize","labels_url":"https://api.github.com/repos/thejameskyle/babel-react-optimize/issues/22/labels{/name}","comments_url":"https://api.github.com/repos/thejameskyle/babel-react-optimize/issues/22/comments","events_url":"https://api.github.com/repos/thejameskyle/babel-react-optimize/issues/22/events","html_url":"https://github.com/thejameskyle/babel-react-optimize/issues/22","id":165985423,"number":22,"title":"Export error for `transform-react-pure-class-to-function`","user":{"login":"jhen0409","id":3001525,"avatar_url":"https://avatars.githubusercontent.com/u/3001525?v=3","gravatar_id":"","url":"https://api.github.com/users/jhen0409","html_url":"https://github.com/jhen0409","followers_url":"https://api.github.com/users/jhen0409/followers","following_url":"https://api.github.com/users/jhen0409/following{/other_user}","gists_url":"https://api.github.com/users/jhen0409/gists{/gist_id}","starred_url":"https://api.github.com/users/jhen0409/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jhen0409/subscriptions","organizations_url":"https://api.github.com/users/jhen0409/orgs","repos_url":"https://api.github.com/users/jhen0409/repos","events_url":"https://api.github.com/users/jhen0409/events{/privacy}","received_events_url":"https://api.github.com/users/jhen0409/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-07-17T17:03:05Z","updated_at":"2016-09-29T21:04:18Z","closed_at":null,"body":"I found a little problem when handling https://github.com/chentsulin/electron-react-boilerplate/issues/278, the following code will broken:\r\n\r\n```js\r\nimport React from 'react'\r\nexport class A extends React.Component {\r\n  render() {\r\n    return (<div></div>)\r\n  }\r\n}\r\nexport class B extends React.Component {\r\n  render() {\r\n    return (<div></div>)\r\n  }\r\n}\r\n```\r\n\r\nIt work fine for `export default`.\r\n\r\nThe stacktrace:\r\n\r\n```\r\nError: Comp.js: We don't know what to do with this node type. We were previously a Statement but we can't fit in here?\r\n    at NodePath.insertAfter (/project_path/node_modules/babel-traverse/lib/path/modification.js:190:13)\r\n    at NodePath.replaceWithMultiple (/project_path/node_modules/babel-traverse/lib/path/replacement.js:93:8)\r\n    at PluginPass.Class (/project_path/node_modules/babel-plugin-transform-react-pure-class-to-function/lib/index.js:96:14)\r\n    at newFn (/project_path/node_modules/babel-traverse/lib/visitors.js:301:19)\r\n    at NodePath._call (/project_path/node_modules/babel-traverse/lib/path/context.js:76:18)\r\n    at NodePath.call (/project_path/node_modules/babel-traverse/lib/path/context.js:48:17)\r\n    at NodePath.visit (/project_path/node_modules/babel-traverse/lib/path/context.js:106:12)\r\n    at TraversalContext.visitQueue (/project_path/node_modules/babel-traverse/lib/context.js:167:16)\r\n    at TraversalContext.visitSingle (/project_path/node_modules/babel-traverse/lib/context.js:118:19)\r\n    at TraversalContext.visit (/project_path/node_modules/babel-traverse/lib/context.js:211:19)\r\n```"},"comment":{"url":"https://api.github.com/repos/thejameskyle/babel-react-optimize/issues/comments/250590888","html_url":"https://github.com/thejameskyle/babel-react-optimize/issues/22#issuecomment-250590888","issue_url":"https://api.github.com/repos/thejameskyle/babel-react-optimize/issues/22","id":250590888,"user":{"login":"cj","id":1819,"avatar_url":"https://avatars.githubusercontent.com/u/1819?v=3","gravatar_id":"","url":"https://api.github.com/users/cj","html_url":"https://github.com/cj","followers_url":"https://api.github.com/users/cj/followers","following_url":"https://api.github.com/users/cj/following{/other_user}","gists_url":"https://api.github.com/users/cj/gists{/gist_id}","starred_url":"https://api.github.com/users/cj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cj/subscriptions","organizations_url":"https://api.github.com/users/cj/orgs","repos_url":"https://api.github.com/users/cj/repos","events_url":"https://api.github.com/users/cj/events{/privacy}","received_events_url":"https://api.github.com/users/cj/received_events","type":"User","site_admin":false},"created_at":"2016-09-29T21:04:18Z","updated_at":"2016-09-29T21:04:18Z","body":"@thejameskyle So if I add `componentWillMount() {}` inside of the `HomePage` class it works!  Surely this has to be a bug."}}
{"actor":{"display_login":"cj"}}