Having a bit of trouble with requestAnimationFrame in Game of Life

I took a look at your code. Your reducer and action creator looks fine. You do however need to save the ID and then dispatch your action with the saved requestID. Here’s the fix:

play() {
  const requestID = requestAnimationFrame(this.play);
  this.props.play(requestID);
  this.props.stepForward();
}

You may also want to create a game loop from within your play method if you want to throttle the speed or allow the player to increase/decrease. Here’s a great link on that:

http://codeincomplete.com/posts/javascript-game-foundations-the-game-loop/