How can I protect nothing ever breaks, while the setTimeout is waiting
And Yes, I don't want to check whether this has been triggered everywhere else.
1 Reply
Hard to guarantee that nothing ever breaks...
A guess about a possible problem in your code snippet is that the effect can be re-executed before the timer expires, which will then call
on_next_puzzle()
twice. Usually you want to clean the timer in a onCleanup(() => clearTimeout(timerId))