First independent React project, any feedback?

I created this Tenzies game after 11 hours of FCC React course, mainly pulling stuff from memory and looking some things up as I went along. Basically, you pick a number, or several, but they all need to be the same number, and after each roll you can only pick those numbers. Once you have 10 identical numbers, you win. Pick a wrong number - you lose. I tried using best practices, and that’s my main concern. Can someone experienced please scan the code and point out the mistakes, namely conventions that I did not follow, or improvements that can be made in the logic (I’m trying to use as little imperative code as possible). I left comments for better navigation.

I forgot to delete it, don’t even know why I left it there in the first place

Honestly I don’t see it, it took me a while to come up with this logic, I might have some ideas but it would take some poking around.

That’s what I thought too, but then I couldn’t figure out another way to apply the animations to those elements. The issue is that I also have to remove them on reset, so that takes up even more lines of code. Can I get a hint?

I see, thanks. But for now I ran into a different problem - for some reason when I open the codepen link on my phone, the text within the Reset button is misaligned, and the game is sometimes won before the last number is selected, when there is still 1 or even 2 numbers left, how can that possibly be? It doesn’t happen on desktop, only on mobile.

Here for example it ended when there were still 2 numbers left, but I explicitly coded in the condition that the game is won no earlier than when **tracker** length is 9, which in this case it was 7. How can this be?

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.