I am trying to use react-dropzone in my project but got error that does not render the reactDropzone component. I tried this:
import ReactDropzone from 'react-dropzone';
export class BankingDetail extends React.Component {
render() {
return (
<ReactDropzone
accept="image/*"
onDrop={()=>console.log("this.onPreviewDrop")}
>
Drop an image, get a preview!
</ReactDropzone>
);
}
}
But got an error as shown in the file:
Can anyone help me with this?
You try to pass a string as children props. But it takes function as children props. Read more about this component here
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.