FineUploader/react-fine-uploader

React.createElement: type is invalid -- expected a string or a class/function

DonGiulio opened this issue · 1 comments

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.

duplicate of #150 and #174. Please also see #166 for a solution that i have yet to get anyone to verify