-
Notifications
You must be signed in to change notification settings - Fork 746
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
React board component doesn’t re-render with React 18 #1073
Comments
Thanks for the bug report! Our React client is currently incompatible with React 18 unfortunately, we need to update it. For now you should be able to downgrade to React 17: npm i react@^17 react-dom@^17 @testing-library/react@^12 And update Let’s keep this open to track React 18 support :-) |
Appreciate the quick response! I will try it later and report back. How big of a job do you think adding React 18 support is going to be? I could try to tackle it |
I haven’t had a chance to dive into React 18 enough to be sure, but I wonder if there’s some deprecated method used in the boardgame.io/src/client/react.tsx Lines 94 to 192 in 3cef3bb
My guess is that it could be a small change if we can spot what the needed change is. If you do have time, I’d love to look at a PR or answer any questions you might have :-) (One hint might be in #1068 where someone reported |
Good afternoon!
Thanks for the great library that makes it easier to make games!
I was experimenting with recreating a card game called
The Game
and I am running into the issue where I callmoves.SomeMove(args)
from the UI, which does update the state of G but the UI doesn't seem to recognize it. The reason I know it gets updated is because if I place the same card on the same pile twice, it gives me an invalid move error in the console (as expected).I don't do much of the front-end development, so it's likely I am just doing something wrong.
Could anyone help me take a look at what it is?
This is my repo: https://github.com/eurubkov/the-game
To repro, just drag a card from the bottom row and drop it into any of the boxes at the top row. The top row should get updated with this new card and the card should disappear from the bottom row but neither of these things is happening.
The move:
./src/Game.js PlayCard
The Drop event in the UI:
./src/Board.js onDragDrop
Appreciate the time and help!
The text was updated successfully, but these errors were encountered: