fortana-co / react-dropzone-uploader

React file dropzone and uploader
https://react-dropzone-uploader.js.org/
MIT License
447 stars 183 forks source link

React Native Support #193

Open SMAsadAli opened 2 years ago

SMAsadAli commented 2 years ago

I was trying to make the basic component work on react native project

const Standard = () => {
  const getUploadParams = () => {
    return { url: 'https://httpbin.org/post' }
  }

  const handleChangeStatus = ({ meta }, status) => {
    console.log(status, meta)
  }

  const handleSubmit = (files, allFiles) => {
    console.log(files.map(f => f.meta))
    allFiles.forEach(f => f.remove())
  }

  return (
    <Dropzone
      getUploadParams={getUploadParams}
      onChangeStatus={handleChangeStatus}
      onSubmit={handleSubmit}
      styles={{ dropzone: { minHeight: 200, maxHeight: 250 } }}
    />
  )
}

<Standard />

and it is throwing me this error constantly.

Screenshot 2022-06-06 at 12 31 24 PM
mariomurrent-softwaresolutions commented 1 year ago

This I just ReactJS. React Native has a completely different approach