Use react-dragula with React components
masterThe react-dragula API is identical to the original dragula API, with minor adjustments to ensure compatibility with React. To use it, you pass an array of DOM elements (containers) to the dragula function. These containers define the areas where items can be dragged and dropped.
var React = require('react');
var dragula = require('react-dragula');
var App = React.createClass({
render: function () {
return <div className='container'>
<div>Item 1</div>
<div>Item 2</div>
</div>;
},
componentDidMount: function () {
var container = React.findDOMNode(this);
dragula([container]);
}
});