with-dnd-context

1.0.4 • Public • Published

with-dnd-context: a HOC solution for backend reusage issue in react-dnd

Why

Cannot have two HTML5 backends at the same time

Basic Usage

import withDndContext from 'with-dnd-context'
 
class MyComponent {}
 
export default withDndContext(MyComponent);

Installation

npm i with-dnd-context --save

API

// backendFactory is optional and default to react-dnd-html5-backend
const withDndContext: (WrappedComponent: React.ComponentType<any>, backendFactory?: BackendFactory) => React.ComponentType<any>;

Package Sidebar

Install

npm i with-dnd-context

Weekly Downloads

33

Version

1.0.4

License

MIT

Unpacked Size

4.23 kB

Total Files

5

Last publish

Collaborators

  • n0rush