React Solution

React solution that has some hacky elements to it, or things that React maintainers would advise/encourage against. This actually took me 5-6 hours to get down perfectly. Midway, I figured this would be a lot easier if done using Vanilla JS because I ended up using some DOM APIs anyway.


Requested feedback

• How/Where can I limit the use of DOM APIs and instead use React Hooks (i.e. `useRef()`) • How can I simplify my code? (i.e. tips to avoid linear operations on the game board) • What is a more efficient approach? • Did you find any bugs?

Comments

You must be signed in to post a comment

Get future questions delivered straight to your inbox for free

Sign up and receive instant access to new questions when we publish them.

We‘ll only use your information to deliver new questions and to provide you updates about our product. We‘ll never spam you or sell your information without your consent. Unsubscribe at any time.