The library at present does not handle pawn promotions. I'm planning to put up a PR for this. What would be an ideal way to provide APIs for this? My suggestion would be,
1 - Update onMovePiece to also pass the promotedToPiece param in case of promotion.
2 - Add a promotion prompt as soon as we recognize white/black pawn on 8/1 rank. (not API but displayed on the board)
3 - Cancel the promotion prompt if new props come in or if the user clicks outside.
The library at present does not handle pawn promotions. I'm planning to put up a PR for this. What would be an ideal way to provide APIs for this? My suggestion would be,
1 - Update onMovePiece to also pass the promotedToPiece param in case of promotion. 2 - Add a promotion prompt as soon as we recognize white/black pawn on 8/1 rank. (not API but displayed on the board) 3 - Cancel the promotion prompt if new props come in or if the user clicks outside.
A good start?