with-dnd-context: a HOC solution for backend reusage issue in react-dnd
Cannot have two HTML5 backends at the same time
import withDndContext from 'with-dnd-context'
class MyComponent {}
export default withDndContext(MyComponent);
npm i with-dnd-context --save
// backendFactory is optional and default to react-dnd-html5-backend
const withDndContext: (WrappedComponent: React.ComponentType<any>, backendFactory?: BackendFactory) => React.ComponentType<any>;