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

Function collect

examples/00 Chessboard/Tutorial App/Knight.js:12–18  ·  view source on GitHub ↗
(connect, monitor)

Source from the content-addressed store, hash-verified

10};
11
12function collect(connect, monitor) {
13 return {
14 connectDragSource: connect.dragSource(),
15 connectDragPreview: connect.dragPreview(),
16 isDragging: monitor.isDragging(),
17 };
18}
19
20@DragSource(ItemTypes.KNIGHT, knightSource, collect)
21export default class Knight extends Component {

Callers 2

getCurrentStateMethod · 0.50
getCurrentStateMethod · 0.50

Calls 1

isDraggingMethod · 0.45

Tested by

no test coverage detected