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

Method render

examples/03 Nesting/Drop Targets/index.js:5–21  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

3
4export default class NestingDropTargets extends Component {
5 render() {
6 return (
7 <div>
8 <p>
9 <b><a href="https://github.com/react-dnd/react-dnd/tree/master/examples/03%20Nesting/Drop%20Targets">Browse the Source</a></b>
10 </p>
11 <p>
12 Drop targets can, too, be nested in one another.
13 Unlike the drag sources, several drop targets may react to the same item being dragged.
14 React DnD by design offers no means of stopping propagation.
15 Instead, the drop targets may compare <code>monitor.isOver()</code> and <code>monitor.isOver({'{'} shallow: false {'}'})</code> to learn if just them, or their nested targets, are being hovered.
16 They may also check <code>monitor.didDrop()</code> and <code>monitor.getDropResult()</code> to learn if a nested target has already handled the drop, and even return a different drop result.
17 </p>
18 <Container />
19 </div>
20 );
21 }
22}

Callers

nothing calls this directly

Calls 2

isOverMethod · 0.80
didDropMethod · 0.45

Tested by

no test coverage detected