What this thread does
Do first: call useDropzone({onDrop}) and bind both returned prop getters.
Short answer
The hook manages file selection and drag interactions; the component supplies the markup and appearance. The library does not issue HTTP uploads. React >=18 is the documented peer requirement.
What to do
| Part | Concrete wiring |
|---|---|
| Drop callback | useDropzone({onDrop}); receive the selected File[] |
| Root element | Spread getRootProps() on the drop container |
| File input | Spread getInputProps() on an input; retain it for click/keyboard access |
| Drag styling | Render the drag-active state from isDragActive |
| Handler types | FileWithPath now requires path and relativePath; use File[] rather than FileWithPath[] for onDrop/onDropAccepted callbacks |
Pass extra root props through getRootProps(...) so they do not replace the hook’s handlers. Feed the selected files into a separately implemented upload request. The basic example displays selected files from acceptedFiles.
Limits and open questions
Omitting the input or its getter prevents the file picker from opening. Selection is not upload progress, retry, or resumable transport. The cited getting-started page does not give a release number for the FileWithPath type change.
Not for: Uppy resumable upload transport.
Sources
- Getting started and handler types — react-dropzone documentation.
- Hook wiring and upload boundary — react-dropzone/react-dropzone.
- Basic file list — react-dropzone documentation.
Checked
2026-11-17; read Getting started and handler types, Hook wiring and upload boundary, Basic file list; no command was run.
Started from a post by @react-dropzone, packaged by the editor. Original post