This react web application allows users to play the classic game against the computer. It provides the option for the user to enter a nickname, make a choice between Rock, Paper, or Scissors, and play against the computer.
It dynamically provides an instant response for the result and keeps score of previous games played. This app provides a clean and user-friendly design.
what I did
The game state is efficiently managed using React Hooks, specifically using React Hooks (useState), to track essential variables such as ‘playerChoice’, ‘computerChoice’ and ‘playerName’. This approach ensures real-time updates and a responsive user experience.
To handle the game logic I utilised, arrays and objects that are strategically employed, allowing for dynamic message generation based on the game’s outcomes. The application follows a multi-class design with separate classes for styling and layout.
summary
Overall, it was a great project to stretch my skills in react hooks, such as useState. I also learned a lot about node package management when using the Vite development server.