Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using chessboard.js with React #210

Open
JonL12345 opened this issue Mar 10, 2021 · 1 comment
Open

Using chessboard.js with React #210

JonL12345 opened this issue Mar 10, 2021 · 1 comment

Comments

@JonL12345
Copy link

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.

@justinfagnani
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants