Once-only onEnd
onEnd fires once per generation. restart() creates a new generation and allows it to fire again.
Once-only onEndLive
Once-only callback
00:05
- waiting for first end event
useTimer({
autoStart: true,
endWhen: snapshot => snapshot.elapsedMilliseconds >= 5000,
onEnd: () => api.markDone(),
});