Hindsight – 13-13 May 16
How do you get around the fact that a setInterval completely screws up references to state when used in a useEffect? In this code,
console.log(frame) always shows 0, but the state does update correctly in the render, and the setFrame works only when it's using a functional update... 