This is a great write-up and is exactly the reason that ChessBoard is "just a board".
Proper PGN parsing and legal move validation is a complex and independent problem that nicely fits into it's own library and should be separate from any display logic.
Proper PGN parsing and legal move validation is a complex and independent problem that nicely fits into it's own library and should be separate from any display logic.
For example: https://github.com/jhlywa/chess.js