During Christmas I got a little bit bored so I spent some time creating a simple memory game with React, JavaScript and a set of old nature photographs of mine. I implemented two different versions that can be fetched from GitHub:
- Using the states in the React components for the game logic:
https://github.com/LarsBergqvist/react-memory-simple - Using Redux as state container:
https://github.com/LarsBergqvist/react-redux-memory-game
Try them out, check out the code and see which version you prefer (you’re likely to not favour any of the versions, but anyway…). I prefer the Redux version as it made the game logic testable.