{"action":"created","issue":{"url":"https://api.github.com/repos/facebook/react/issues/3478","labels_url":"https://api.github.com/repos/facebook/react/issues/3478/labels{/name}","comments_url":"https://api.github.com/repos/facebook/react/issues/3478/comments","events_url":"https://api.github.com/repos/facebook/react/issues/3478/events","html_url":"https://github.com/facebook/react/issues/3478","id":63529372,"number":3478,"title":"Confusing error message when passing non string, non component class to React.createElement","user":{"login":"andreypopp","id":30594,"avatar_url":"https://avatars.githubusercontent.com/u/30594?v=3","gravatar_id":"","url":"https://api.github.com/users/andreypopp","html_url":"https://github.com/andreypopp","followers_url":"https://api.github.com/users/andreypopp/followers","following_url":"https://api.github.com/users/andreypopp/following{/other_user}","gists_url":"https://api.github.com/users/andreypopp/gists{/gist_id}","starred_url":"https://api.github.com/users/andreypopp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andreypopp/subscriptions","organizations_url":"https://api.github.com/users/andreypopp/orgs","repos_url":"https://api.github.com/users/andreypopp/repos","events_url":"https://api.github.com/users/andreypopp/events{/privacy}","received_events_url":"https://api.github.com/users/andreypopp/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/facebook/react/labels/good%20first%20bug","name":"good first bug","color":"009800"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":17,"created_at":"2015-03-22T12:51:48Z","updated_at":"2015-06-20T07:53:43Z","closed_at":"2015-03-26T21:39:32Z","body":"The following code:\r\n```\r\nvar X = true;\r\nvar Hello = React.createClass({\r\n    render: function() {\r\n        return <X>Hello {this.props.name}</X>;\r\n    }\r\n});\r\n```\r\nproduces\r\n```\r\nUncaught TypeError: undefined is not a function\r\n```\r\ndeep into React.\r\n\r\nhttp://jsfiddle.net/92env5pj/1/"},"comment":{"url":"https://api.github.com/repos/facebook/react/issues/comments/113726124","html_url":"https://github.com/facebook/react/issues/3478#issuecomment-113726124","issue_url":"https://api.github.com/repos/facebook/react/issues/3478","id":113726124,"user":{"login":"joerx","id":1712460,"avatar_url":"https://avatars.githubusercontent.com/u/1712460?v=3","gravatar_id":"","url":"https://api.github.com/users/joerx","html_url":"https://github.com/joerx","followers_url":"https://api.github.com/users/joerx/followers","following_url":"https://api.github.com/users/joerx/following{/other_user}","gists_url":"https://api.github.com/users/joerx/gists{/gist_id}","starred_url":"https://api.github.com/users/joerx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joerx/subscriptions","organizations_url":"https://api.github.com/users/joerx/orgs","repos_url":"https://api.github.com/users/joerx/repos","events_url":"https://api.github.com/users/joerx/events{/privacy}","received_events_url":"https://api.github.com/users/joerx/received_events","type":"User","site_admin":false},"created_at":"2015-06-20T07:53:43Z","updated_at":"2015-06-20T07:53:43Z","body":"Getting this error when using ES6-style `export` and a browserify/babelify/reactify toolchain. @infolock's way works. So:\r\n```js\r\nexport class MyWidget extends React.Component {\r\n//...\r\n}\r\n```\r\nresults in the `TypeError`, but\r\n```js\r\nclass MyWidget extends React.Component {\r\n//...\r\n}\r\nmodule.exports = MyWidget;\r\n```\r\nworks."}}