Element type is invalid error
See original GitHub issueDo you want to request a feature or report a bug?
- I found a bug
- I want to propose a feature
What is the current behavior?
It seems like the plugin not getting imported following the installation guidance
React.createElement: type should not be null, undefined, boolean, or number. It should be a string (for DOM elements) or a ReactClass (for composite components)
and
Error: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: object.
What I have tried to fix the problem?
I have seen various possible ways to fix it but none of them worked. For example importing like
import { Dropzone } from 'react-dropzone'
instead of
import Dropzone from 'react-dropzone'
But that will not solve the problem. The only way I made it work is by downgrading to version 4.1.3 as someone mentioned before, but thats no use as it has a major bug which crashes the browser as been reported in #549
Please mention other relevant information such as the browser version, Operating System and react-dropzone version.
react-dropzone 4.2.5 Chrome Version 63.0.3239.132 npm 5.6.0 node 6.12.0
Issue Analytics
- State:
- Created 6 years ago
- Reactions:6
- Comments:30
Top GitHub Comments
I still have the same problem. But importing like this works:
import * as Dropzone from 'react-dropzone';
worked for me