Javascript – Stopping a timer in React by meeting a condition (instead of with a "stop" button)
I've built a simple stopwatch with start and stop buttons. I've also built a really barebones matching game where a user clicks on 5 different squares that start out as random colors (possibility of being 7 predefined colors). Every time…