MCPcopy Create free account
hub / github.com/react-dnd/react-dnd / constructor

Method constructor

packages/dnd-core/src/DragDropManager.js:7–16  ·  view source on GitHub ↗
(createBackend, context = {})

Source from the content-addressed store, hash-verified

5
6export default class DragDropManager {
7 constructor(createBackend, context = {}) {
8 const store = createStore(reducer);
9 this.context = context;
10 this.store = store;
11 this.monitor = new DragDropMonitor(store);
12 this.registry = this.monitor.registry;
13 this.backend = createBackend(this);
14
15 store.subscribe(this.handleRefCountChange.bind(this));
16 }
17
18 handleRefCountChange() {
19 const shouldSetUp = this.store.getState().refCount > 0;

Callers

nothing calls this directly

Calls 1

createBackendFunction · 0.85

Tested by

no test coverage detected