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

Method drop

packages/react-dnd/src/createTargetFactory.js:63–80  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

61 }
62
63 drop() {
64 if (!spec.drop) {
65 return undefined;
66 }
67
68 const dropResult = spec.drop(this.props, this.monitor, this.component);
69 if (process.env.NODE_ENV !== 'production') {
70 invariant(
71 typeof dropResult === 'undefined' ||
72 isPlainObject(dropResult),
73 'drop() must either return undefined, or an object that represents the drop result. ' +
74 'Instead received %s. ' +
75 'Read more: http://react-dnd.github.io/react-dnd/docs-drop-target.html',
76 dropResult,
77 );
78 }
79 return dropResult;
80 }
81 }
82
83 return function createTarget(monitor) {

Callers 1

handleTopDropMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected