Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

React Native Support #193

Open
SMAsadAli opened this issue Jun 6, 2022 · 1 comment
Open

React Native Support #193

SMAsadAli opened this issue Jun 6, 2022 · 1 comment

Comments

@SMAsadAli
Copy link

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

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants