A memory game with React

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:

  1. Using the states in the React components for the game logic:
    https://github.com/LarsBergqvist/react-memory-simple
  2. 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.

 

Advertisements

A React app for Philips Hue lights

In my previous post I showed how a Philips Hue bridge can be integrated with Home Assistant for controlling lights with automation. The Philips Hue bridge has an easy-to-use REST API so you can make your own integration on any platform that supports http. In this post I will describe how I have created a React web application for controlling my lights via the Philips Hue api.

Continue reading →