http://zyzo.github.io/react-dnd-mouse-backend/
Mouse Backend for React Drag and Drop library http://gaearon.github.io/react-dnd
import { DragDropContext } from 'react-dnd'
import MouseBackEnd from 'react-dnd-mouse-backend'
const App = {...}
const AppContainer = DragDropContext(MouseBackEnd)(App)First, prepare the playground:
cd example;
yarn; yarn startThen head to http://localhost:3030/ to start some fun drag and dropping.
First, install the project locally:
git clone [email protected]:zyzo/react-dnd-mouse-backend.git
cd react-dnd-mouse-backend; npm install
# (Optional) prepare example project
cd example; npm installThen, link react-dnd-mouse-backend to example project (or your js project):
# in ./react-dnd-mouse-backend
npm link
cd example; npm link react-dnd-mouse-backendFinally you can begin to make changes in src folder, and rebuild the lib:
npm run buildInspired by HTML5 Backend & Touch Backend to support only mouse events, which work much better in some cases, like svg.