React.createElement: type is invalid -- expected a string or a class/function
DonGiulio opened this issue · 1 comments
DonGiulio commented
Hello,
I'm testing react-fine-uploader for my app, but I'm getting this problem:
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.
Check the render method of `Gallery`.
This is the component raising the issue:
import React from "react";
import FineUploaderTraditional from "fine-uploader-wrappers";
import Gallery from "react-fine-uploader";
import "react-fine-uploader/gallery/gallery.css";
const uploader = new FineUploaderTraditional({
options: {
request: {
endpoint: "my/upload/endpoint"
},
callbacks: {
onComplete: (id, name, response) => {
// handle completed upload
}
}
}
});
const ImagesUploader = props => <Gallery uploader={uploader} />;
export default ImagesUploader;
and the line generating the error is: const ImagesUploader = props => <Gallery uploader={uploader} />;
It's all pretty vanilla here, right out of the documentation.