chessboardjs icon indicating copy to clipboard operation
chessboardjs copied to clipboard

Using chessboard.js with React

Open JonL12345 opened this issue 3 years ago • 1 comments

I would like to use chessboard.js with React. Has anyone here done this successfully and can point me towards some details on how to do this?

I've looked at a ton of different boards, and I see there is one for React, but it is unmaintained, so I figured it might be better to use chessboard.js for that reason. But I need to know how.

JonL12345 avatar Mar 10 '21 15:03 JonL12345

I have a port of chessboard.js to web components: https://justinfagnani.github.io/chessboard-element/ and an example of using it in React here: https://stackblitz.com/edit/react-chess-board

This works because to React a web component is just another HTML element, and the internals are encapsulated in a shadow root.

justinfagnani avatar Mar 18 '21 23:03 justinfagnani