Closed iancanderson closed 2 years ago
This brings back https://github.com/octokatherine/word-master/pull/110, plus a commit that defers setting the guess count in the streak until a new game is started: https://github.com/octokatherine/word-master/commit/4d6c91956f64d57ef7ff5bb5f999091d56fdae59
I still don't completely understand the race condition that was preventing the guesses in streak to be set to zero before, but I think it has something to do with stale closure values (maybe due to setting state within useEffect)
useEffect
This brings back https://github.com/octokatherine/word-master/pull/110, plus a commit that defers setting the guess count in the streak until a new game is started: https://github.com/octokatherine/word-master/commit/4d6c91956f64d57ef7ff5bb5f999091d56fdae59
I still don't completely understand the race condition that was preventing the guesses in streak to be set to zero before, but I think it has something to do with stale closure values (maybe due to setting state within
useEffect
)