Skip to content

Upgrading react-dropzone 6 to 7

Breaking6.2.4 → 7.0.1Breaking2Fixed1

BreakingUpgrade verdict

1 breaking change.

  • Dropped files no longer come with a ready-made preview image link, because those links could leak memory. You can create and clean up previews yourself when files are dropped.
1 item needs code or config changes
Breaking1
Removes the File.preview property to avoid possible memory leaks.
File.previewonDrop()

Generated by DepDelta from published .d.ts files. Not mixed with prose notes.

  • removed: interface FileWithPreview extends File
  • removed: property FileWithPreview.preview?: string
  • changed: type DropFileEventHandler = (acceptedOrRejected: FileWithPreview[], event: React.DragEvent<HTMLDivElement>) => void → type DropFileEventHandler = (acceptedOrRejected: File[], event: React.DragEvent<HTMLDivElement>) => void
  • changed: type DropFilesEventHandler = (accepted: FileWithPreview[], rejected: FileWithPreview[], event: React.DragEvent<HTMLDivElement>) => void → type DropFilesEventHandler = (accepted: File[], rejected: File[], event: React.DragEvent<HTMLDivElement>) => void
  • changed: type DropzoneProps = Omit<React.HTMLProps<HTMLDivElement>, 'onDrop' | 'ref'> & { disableClick?: boolean; disabled?: boolean; disablePreview?: boolean; preventDropOnDocument?: boole… → type DropzoneProps = Omit<React.HTMLProps<HTMLDivElement>, 'onDrop' | 'ref'> & { disableClick?: boolean; disabled?: boolean; preventDropOnDocument?: boolean; inputProps?: React.Inp…