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

Method removeSource

packages/dnd-core/src/HandlerRegistry.js:136–144  ·  view source on GitHub ↗
(sourceId)

Source from the content-addressed store, hash-verified

134 }
135
136 removeSource(sourceId) {
137 invariant(this.getSource(sourceId), 'Expected an existing source.');
138 this.store.dispatch(removeSource(sourceId));
139
140 asap(() => {
141 delete this.handlers[sourceId];
142 delete this.types[sourceId];
143 });
144 }
145
146 removeTarget(targetId) {
147 invariant(this.getTarget(targetId), 'Expected an existing target.');

Callers 4

endDragNativeItemMethod · 0.80
unregisterSourceFunction · 0.80

Calls 2

getSourceMethod · 0.95
removeSourceFunction · 0.90

Tested by

no test coverage detected