Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
File Upload component exposes dropzoneProps from react-dropzone, should instead abstract away those features #3966
Describe the issue. What is the expected and unexpected behavior?
The new beta FileUpload component uses the
All other features of Dropzone are made available by exposing an object prop called
I was discussing this with @redallen and he made the point that exposing their props interface directly may not be a good idea, since we will be stuck with that interface and dependent on their documentation for any features that require it. If we ever wanted to move away from react-dropzone and use something else internally, or remain on an older version if we disagree with changes they make in the future, we'd be stuck with consumers using their old props and we'd have to make a large breaking change or have people confused why they can't use newer props from new react-dropzone docs.
His proposed solution is to remove the
This way, all of the available props and documentation would be in-house, we would no longer need to depend on react-dropzone's docs, and if we needed to depart from react-dropzone's future changes we would be able to without necessarily breaking consumers.
The main drawback here would be that if there is some use case the dropzone props support that we choose not to expose, consumers would not be able to use that unless we update our props. Also, we would complicate our props table in the docs with a bunch of stuff many people will never use.
I'm leaning towards agreeing with @redallen here, but feedback is welcome.
Please provide the steps to reproduce. Feel free to link CodeSandbox or another tool.
Is this a bug or enhancement? If this issue is a bug, is this issue blocking you or is there a work-around?
Bug, sort of, more like potential technical debt.
What is your product and what release version are you targeting?