sarink / react-file-drop

React component for Gmail or Facebook -like drag and drop file uploader

Home Page:https://www.sarink.net

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

when using Typescript -> JSX element type 'FileDrop' does not have any construct or call signatures.ts(2604)

chrisdraws opened this issue · comments

In typescript I'm getting this message -> "import FileDrop, JSX element type 'FileDrop' does not have any construct or call signatures.ts(2604)." Which seems very odd. I haven't looked through your source code yet. But I suspect the issue lies somewhere in the way you are overloading the FileDrop.

@chrisdraws there is no default export, your import should look like import { FileDrop }

@sarink Thanks... okay this is odd. I guess it's my mistake... through a combination of installing this library into a linked library(which had version 3) I use in another application. It was somehow in VsCode's typescripts warnings pulling warning from what appear to be the old version of react-file-drop, like version 1, I had in my application that was being linked into... Sorry I know that all sounds very odd. But now that I updated the version of react-file-drop everywhere... it's now all reading correctly. No Typescript errors. Thanks for the response. Feel free to close this. Makes sense why I couldn't find any one else suffering from this. Self inflicted. That's what we get for having several applications that share a library of shared libraries...

👍 glad you got it figured out!