-
Notifications
You must be signed in to change notification settings - Fork 59
Question on registering move in logic #102
Copy link
Copy link
Open
Description
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" }}
/>
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels