npm react-dnd 13.0.0
v13.0.0

latest releases: 16.0.1, 16.0.0, 15.1.2...
3 years ago

React-DnD v13, Others v12

v12 was largely structural and organizational, but some issues were discovered shortly after release that warranted changing the hooks API.

Breaking Changes

  • useDrag, useDrop hooks accept functions that create spec objects instead of spec objects directly. Clients can think about the API to useDrag() and useDrop() as being analogous to useMemo(). This allows clients to have direct control over when their DnD specifications are re-generated (which internally reattaches them to the DnD system).
  • Use jsx-factory throughout the library

Non-Breaking Changes

  • Add HTML native draggable type to HTML5Backend (see new example)
  • Clients can specify a rootElement component in the HTML5Backend options to localize where DnD will process events in the client app.
  • react-dnd-test-utils has improved support for testing with HTML5Backend and using @testing-library/react to simulate drag-and-drop sequences.

Don't miss a new react-dnd release

NewReleases is sending notifications on new releases.