Skip to content
This repository has been archived by the owner on Nov 19, 2018. It is now read-only.

Gallery is not working #174

Closed
ghost opened this issue Feb 1, 2018 · 13 comments
Closed

Gallery is not working #174

ghost opened this issue Feb 1, 2018 · 13 comments

Comments

@ghost
Copy link

ghost commented Feb 1, 2018

Here is what I got what I try to use the sample of the Gallery provided in the README.
warning.js?6327:33 Warning: React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: undefined. You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports

@rnicholus
Copy link
Member

I can't help if you don't show your code.

@rnicholus
Copy link
Member

Are you perhaps using React v16?

@ghost
Copy link
Author

ghost commented Feb 1, 2018

I didn't show any code since this is the exact same code provided in the README.

Yes, you're right, I'm using v16... Just realised it isn't supported yet! :)

@rnicholus
Copy link
Member

Well, you can verify if a proposed fix actually works then. Please pull down https://github.com/Dog/react-fine-uploader/tree/patch-1 and verify. If it resolves your issue, then I'll release it as a new version.

@ghost
Copy link
Author

ghost commented Feb 1, 2018

I just tried, I got another error:

Uncaught Error: Element ref was specified as a string (dropZone) but no owner was set. You may have multiple copies of React loaded. (details: https://fb.me/react-refs-must-have-owner).

@rnicholus
Copy link
Member

that's definitely an issue on your end

@hackwater
Copy link

@MikeBailleul, I'm able to run Gallery on React 16 if I downgrade react-transition-group to version 1 from version 2. I got your initial error running it with version 2, but I haven't seen your second error. I'll do some more testing to see if I can find any issues with React 16 (and I'll post in that thread).

@ghost
Copy link
Author

ghost commented Feb 7, 2018

Thanks @hackwater, I haven't had the chance to try again, when I do, I'll post here.

@rnicholus
Copy link
Member

react-transition-group, unfortunately, is a horrible library that i should have never integrated into React Fine Uploader's <Gallery> component, and it's even worse with these incompatibility issues.

I'm considering a breaking change that will remove react-transition-group entirely but allow you to specify a wrapper for the files list. I haven't considered the best way to do this yet though...

@rnicholus
Copy link
Member

Also, this version should fix the issue too, i think, but i don't have the time to get React 16 running and I don't want to release this until someone confirms it fixes the issue - https://github.com/Dog/react-fine-uploader/tree/patch-1

@focux
Copy link

focux commented Feb 13, 2018

@hackwater This works for me. @rnicholus I tried with that version but it did not work.

@rnicholus
Copy link
Member

What happened exactly? Because that branch matches @hackwater’s suggestion exactly

@rnicholus
Copy link
Member

Let's continue this discussion in #171

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants