Last 12 weeks · 0 commits
1 of 6 standards met
I found a way to cheat in this game 😄 See video below as this is pretty easy to reproduce. https://github.com/user-attachments/assets/0b771e0f-78b6-45b0-9767-01cb94142feb This can be recreated using his demo link. I noticed this happening as I was following along the tutorial and thought I was going mad. Seems like it could be fixed by either disabling the click event until the animation is over, or restructuring how the duplicate tiles are initialized.
I was going through the animal farm app part of the course and was able to get the endpoint running on localhost, but for whatever reason when I try to pass query params with "http://localhost:8080/?=bear", is always an empty object so is always undefined. So I pulled down the repo, npm installed both front end and server, and still experiencing the exact same behavior. Any ideas? Nothing I've found on SO or here has solved my issues yet.
Repository: fireship-io/react-course. Description: React - The Full Course Stars: 82, Forks: 43. Primary language: JavaScript. Languages: JavaScript (70.8%), CSS (17%), HTML (12.2%). Open PRs: 2, open issues: 4. Last activity: 1y ago. Community health: 25%. Top contributors: codediodeio.
Adding a Debounce Mechanism: This prevents a bug in the game where a user can exploit the game mechanics by rapidly double-clicking on a single upside-down card. It was causing the card and its matching pair to flip over automatically**, resulting in an unintended match. We could also use 'useCallback' hook here. But since it was not included in the course, I made changes in the condition itself. Nevertheless, Here's the code with the useCallBack hook: