Basic Drag and Drop for React
npm install react-drag-and-dropThis library contains some very basic draggable and droppable components.
You probably want to use something more stable and feature rich like react-dnd.
``sh`
npm install react-drag-and-drop
`js
import { Draggable, Droppable } from 'react-drag-and-drop'
class App extends React.Component {
render() {
So the idea is that you wrap your components in Draggable and Droppable containers (instead of using mixins), define types and data to carry. You can also hook into the different drag events to create more funk. The best way (for now) to figure out how is to peak inside the src directory. The implementation is quite minimal.
Changelog
$3
* Support for React 16
* Updated most dev deps to latest
$3
* Support for
wrapperComponent prop where one can pass a component to be used instead of the standard components for Draggable and Droppable :tada: Thanks to @aaa707 for this one :rocket:$3
* Support for
enabled prop for Droppable component$3
* Droppable now accepts
className` as prop - thanks @abdennour :tada:* Support for React 15
* Support for enable prop in Draggable component
* Did a build (forgot for 2.0.0 release) :facepalm:
* Updated to remove warning for React v0.14
* Spreading this.props on both Draggable and Droppable
* Added FireFox support (DOMStringList -> Array)
* Initial release :tada:
enjoy