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

update READme #9

Open
lisahns opened this issue Oct 19, 2022 · 1 comment
Open

update READme #9

lisahns opened this issue Oct 19, 2022 · 1 comment

Comments

@lisahns
Copy link
Collaborator

lisahns commented Oct 19, 2022

No description provided.

@lisahns
Copy link
Collaborator Author

lisahns commented Oct 19, 2022

Day 1:
what we did:

  • create memory container
  • we insert and randomise dummy data
  • when two li elements are clicked, they are compared: if match -> hide card + add points
  • show points dynamically to the page
  • get level and start the game based on the level

what we struggled with:

  • re-randomising on every render when using useState()
  • extracting randomiser from game component
  • implementing css grid

what we learned:

  • using className instead of class inside html attributes in react
  • better sense of how useState() and useEffect() work -> whole component will re-render
  • importance of modularisation in react

What to do tomorrow:

  • when all cards are matched go to next level
  • when level 5 is completed show win screen
  • css
  • useState() for guesses and score

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