Using React JS for the TicTacToe front-end on a 4x4 Board
ReactJS (Vite) + Tailwind CSS
- aws-amplify
- @aws-amplify/ui-react
3 main components:
- Cell (a button which changes value when clicked)
- Board (an array of 16 cells, managing the winning check and cells' states)
- Code handling authentication + calling the api with OAuth 2 IdToken and bitmasked boardState (explained in Backend)
Nothing unusual. The only tricky part was to set up the Authenticator element and configure AWS Cognito details.