{"action":"closed","issue":{"url":"https://api.github.com/repos/transloadit/uppy/issues/602","repository_url":"https://api.github.com/repos/transloadit/uppy","labels_url":"https://api.github.com/repos/transloadit/uppy/issues/602/labels{/name}","comments_url":"https://api.github.com/repos/transloadit/uppy/issues/602/comments","events_url":"https://api.github.com/repos/transloadit/uppy/issues/602/events","html_url":"https://github.com/transloadit/uppy/issues/602","id":295626799,"number":602,"title":"Can not create React Plugin","user":{"login":"kerry-convery","id":23343537,"avatar_url":"https://avatars3.githubusercontent.com/u/23343537?v=4","gravatar_id":"","url":"https://api.github.com/users/kerry-convery","html_url":"https://github.com/kerry-convery","followers_url":"https://api.github.com/users/kerry-convery/followers","following_url":"https://api.github.com/users/kerry-convery/following{/other_user}","gists_url":"https://api.github.com/users/kerry-convery/gists{/gist_id}","starred_url":"https://api.github.com/users/kerry-convery/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kerry-convery/subscriptions","organizations_url":"https://api.github.com/users/kerry-convery/orgs","repos_url":"https://api.github.com/users/kerry-convery/repos","events_url":"https://api.github.com/users/kerry-convery/events{/privacy}","received_events_url":"https://api.github.com/users/kerry-convery/received_events","type":"User","site_admin":false},"labels":[{"id":784148980,"url":"https://api.github.com/repos/transloadit/uppy/labels/REACT","name":"REACT","color":"df89e5","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-02-08T18:55:56Z","updated_at":"2018-02-10T20:09:39Z","closed_at":"2018-02-10T20:09:39Z","author_association":"NONE","body":"I'm trying to make a custom Uppy React plugin but I'm getting the following error\r\n\r\n'TypeError: Cannot call a class as a function'\r\n\r\n```\r\nimport Plugin from 'uppy/src/core/Plugin';\r\n\r\nexport default class DropZone extends Plugin {\r\n}\r\n```\r\nI am then consuming the component as follows:\r\n\r\n```\r\nimport React from 'react';\r\nimport Uppy from 'uppy/lib/core/Core';\r\nimport DropZone from '../DropZone';\r\n\r\nconst uppy = new Uppy({ debug: true });\r\nuppy.run();\r\n\r\nexport default class FileManager extends React.Component {\r\n  render() {\r\n    return (<DropZone uppy={uppy} />);\r\n  }\r\n}\r\n```\r\nI've cut down the code for simplicity. I looked at the implementation of the uppy DragDrop plugin and followed its implement but still get the same error.\r\n\r\nHas anyone had experience writing a react plugin for Uppy? as I'm lost as to how I can resolve this error.\r\n\r\nThanks"}}
{"actor":{"display_login":"kerry-convery"}}