Hello, I was wondering if someone can speak to onMove in this snippet is being invoked instead of called with parenthesis. I wrote my own validation for this and not understanding how the move that is played on chessground gets passed into the validator such as () => onMove(from, to, promoteTo), I see this example is using chess.js. Let me know if I can clarify anything. Thanks for your time.
Ryan
<Chessground
width="38vw"
height="38vw"
turnColor={turnColor()}
movable={calcMovable()}
lastMove={lastMove}
fen={fen}
onMove={onMove}
style={{ margin: "auto" }}
/>
Hello, I was wondering if someone can speak to
onMovein this snippet is being invoked instead of called with parenthesis. I wrote my own validation for this and not understanding how the move that is played on chessground gets passed into the validator such as() => onMove(from, to, promoteTo), I see this example is using chess.js. Let me know if I can clarify anything. Thanks for your time.Ryan