### Installing react-dragula with Bower (Shell) Source: https://github.com/bevacqua/react-dragula/blob/master/readme.markdown Installs the react-dragula package using the Bower package manager, saving it to the project's bower.json file. ```shell bower install react-dragula --save ``` -------------------------------- ### Installing react-dragula with npm (Shell) Source: https://github.com/bevacqua/react-dragula/blob/master/readme.markdown Installs the react-dragula package and its dependencies using the npm package manager, saving it to the project's package.json file. ```shell npm install react-dragula --save ``` -------------------------------- ### Start continuous build for react-dragula (shell) Source: https://github.com/bevacqua/react-dragula/blob/master/contributing.markdown Runs the build process continuously, automatically recompiling the library whenever source files change. This command is useful for facilitating development by providing rapid feedback. ```shell npm start ``` -------------------------------- ### Basic react-dragula Usage (React.createClass, JSX) Source: https://github.com/bevacqua/react-dragula/blob/master/readme.markdown Demonstrates basic usage of react-dragula with a React component created using React.createClass. It initializes dragula on the component's DOM node after mounting. ```jsx var React = require('react'); var dragula = require('react-dragula'); var App = React.createClass({ render: function () { return
Swap me around
Swap her around
Swap him around
Swap them around
Swap us around
Swap things around
Swap everything around
; }, componentDidMount: function () { var container = React.findDOMNode(this); dragula([container]); } }); React.render(, document.getElementById('examples')); ``` -------------------------------- ### Build react-dragula (shell) Source: https://github.com/bevacqua/react-dragula/blob/master/contributing.markdown Compiles the react-dragula library into standalone browserify modules, including a minified version. The output is placed in the `dist` directory. These generated files should not be included in pull requests. ```shell npm run build ``` -------------------------------- ### Run react-dragula tests once (shell) Source: https://github.com/bevacqua/react-dragula/blob/master/contributing.markdown Executes all project tests a single time. This command is typically used in continuous integration (CI) environments to verify the project state without watching for file changes. ```shell npm test ``` -------------------------------- ### Run react-dragula tests continuously (shell) Source: https://github.com/bevacqua/react-dragula/blob/master/contributing.markdown Executes all project tests in a DevTools window using Electron. The DevTools window automatically reloads when test files are modified, streamlining the testing workflow during development. ```shell npm run test-watch ``` -------------------------------- ### react-dragula Usage with Refs (ES2015 Class, JSX) Source: https://github.com/bevacqua/react-dragula/blob/master/readme.markdown Shows how to use react-dragula with a modern React component class and the ref callback attribute. It initializes dragula on the container element using a ref. ```jsx import * as React from "react"; import * as ReactDOM from 'react-dom'; import Dragula from 'react-dragula'; export class App extends React.Component { render () { return
Swap me around
Swap her around
Swap him around
Swap them around
Swap us around
Swap things around
Swap everything around
; }, dragulaDecorator = (componentBackingInstance) => { if (componentBackingInstance) { let options = { }; Dragula([componentBackingInstance], options); } }; }); ReactDOM.render(, document.getElementById('examples')); ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.