(updateFn)
| 56 | } |
| 57 | |
| 58 | scheduleUpdate(updateFn) { |
| 59 | this.pendingUpdateFn = updateFn; |
| 60 | |
| 61 | if (!this.requestedFrame) { |
| 62 | this.requestedFrame = requestAnimationFrame(this.drawFrame); |
| 63 | } |
| 64 | } |
| 65 | |
| 66 | drawFrame() { |
| 67 | const nextState = update(this.state, this.pendingUpdateFn); |