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

Method renderPiece

examples/00 Chessboard/Tutorial App/Board.js:30–34  ·  view source on GitHub ↗
(x, y)

Source from the content-addressed store, hash-verified

28 }
29
30 renderPiece(x, y) {
31 const [knightX, knightY] = this.props.knightPosition;
32 const isKnightHere = x === knightX && y === knightY;
33 return isKnightHere ? <Knight /> : null;
34 }
35
36 render() {
37 const squares = [];

Callers 1

renderSquareMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected