If DropzoneS3Uploader is given an onDrop callback, it will be present in the dropzoneProps const in the component's render method.
In render, when the Dropzone component is returned, it is given an onDrop property set to this.handleDrop, but then spreads the dropzoneProps, which will have an onDrop key. This means that onDrop={this.handleDrop} will always be replaced when the onDrop property exists.
This makes it strange that the handleDrop method checks the presence of and invokes this.props.onDrop.
Is the onDrop prop is supposed to fully replace handleDrop, or be called at the end of handleDrop? From my read on it, the latter can never happen.
If DropzoneS3Uploader is given an
onDrop
callback, it will be present in thedropzoneProps
const in the component's render method.In render, when the Dropzone component is returned, it is given an onDrop property set to
this.handleDrop
, but then spreads the dropzoneProps, which will have an onDrop key. This means thatonDrop={this.handleDrop}
will always be replaced when the onDrop property exists.This makes it strange that the handleDrop method checks the presence of and invokes
this.props.onDrop
.Is the onDrop prop is supposed to fully replace handleDrop, or be called at the end of handleDrop? From my read on it, the latter can never happen.