Releases: chrisjpatty/react-dragtastic
Performance Improvements
Since react-dragtastic
was released it's been used in a variety of interesting ways that we never even imagined. This new release helps alleviate a performance pain point of a common scenario, rendering large numbers of draggables and droppables. Now every exported component has a new optional prop called subscribeTo
, which accepts an array of strings. If this prop is present the component's render prop function will only be called if at least one of the keys that was passed has changed.
Flow improvements and Customizable Droppable ID
v2.3.1 Incremented minor package version
Improved render performance and new alwaysRender flag
- Migrated from
forceUpdate
tosetState
for improved render performance. (Thanks @TrySound!) - Added alwaysRender prop to
DragComponent
to allow it to always render regardless of whether or not you're dragging.
Flow support, Tests, and bug fixes
Highlights:
- Flow support 🎉
- New tests 📝
- Smaller bundle size with Rollup (16kb, and 3.3kb gzipped) 🗜
- Miscellaneous bug squashing. 🐞
A big thanks to @TrySound for contributing massively to this release!
Added new DragState component and additional events
Added new component for providing dragState without attaching events. See README for DragState
Added additional event hooks:
- onDrag: function called when
Draggable
drags - onDragEnter: function called when
Droppable
is entered. - onDragLeave: function called when
Droppable
is left.
Added PropTypes & and a new delay function
Draggables now wait for the user's pointer to travel a specified distance before activating. Defaults to 8 pixels. See Draggable
documentation for more info.
New DragComponent state properties
Added a new state property, isOverAccepts
. See documentation for more
Miscellaneous bug fixes.
Version 2.0 - Complete Rewrite
Version 2.0 represents a total rewrite of react-dragtastic
. In this new release there are now 3 available components:
- Draggable
- Droppable
- DragComponent
See the docs for implementation specifics
Also included in this release:
- Primitive mobile support 🎉📱_(With more support coming soon)_
- Stability improvements
- A formalized API
- More complete documentation, and
- A snazzy new logo!