Closed gabrilator closed 1 year ago
Yes, you need to pass it in through the config property.
<Chessground config={{
events: {
move: onMove
}
}} />
Where onMove has signature: move?: (orig: cg.Key, dest: cg.Key, capturedPiece?: cg.Piece) => void;
Yes, you need to pass it in through the config property.
<Chessground config={{ events: { move: onMove } }} />
Where onMove has signature:
move?: (orig: cg.Key, dest: cg.Key, capturedPiece?: cg.Piece) => void;
awesome response, thanks for resolving!
Hey! Great job with the library, enjoying it so far!
I wonder if there's an implementation of onMove to receive the from and to after a user moves.
Thanks a lot! Gabriel