Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not fetching new word on replay #7

Open
moretime-dev opened this issue Jun 25, 2023 · 0 comments
Open

Not fetching new word on replay #7

moretime-dev opened this issue Jun 25, 2023 · 0 comments

Comments

@moretime-dev
Copy link
Contributor

I am just playing it a bit and on restart of the game, no matter if won or lost, the game doesn't work, it stays at the first guess, nothing happens when you press enter for the first time and the second time, the alert triggers to tell you, that you already guessed that.

Everything seems to be reset properly, but for the new attempt, there is no new word fetched from the /words.json file. I guess the empty dependendy array from the first useEffect does not trigger a rerender upon resetting the ui.

Putting the userSolution in that first useEffect Dependency Array fixes the problem, but it is actually not required there, so maybe there is a better solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant