Skip to content
  • Unlock Pro
  • Log in with GitHub
Solution
Submitted over 1 year ago

rock paper scissor challenge

motion, react, tailwind-css, vite, typescript
Azzy dvyastia kesuma•1,425
@azzykesuma
A solution to the Rock, Paper, Scissors game challenge
View live sitePreview (opens in new tab)View codeCode (opens in new tab)

Solution retrospective


What are you most proud of, and what would you do differently next time?
  • adding image queue for house selection to simulate randomness
  • using ripple effect on the ripple layout
  • persisting the score on localStorage
What challenges did you encounter, and how did you overcome them?

for me, the main challenges for this challenge is actually the layout, not the game logic itself. i am quite unsatisfied with the ripple layout, the text for both house and player ,and the layout changes when the ripple layout appear

to overcome it, i use a lot of position:absolute, which is actually kinda bad because i have to micro manage the position of the text and the ripple.

there is also some flicker when the image changes which can be annoying

What specific areas of your project would you like help with?

i use a lot of values inside the useContext, which works, but i feel it made my context bloated. i can split the values into multiple context, but i fear that it will make my main.tsx into context wrapper hell, and i also try to avoid using over complicated state management like redux for this simple project. how can i simplify the context without sacrificing code readability?

Code
Loading...

Please log in to post a comment

Log in with GitHub

Community feedback

No feedback yet. Be the first to give feedback on Azzy dvyastia kesuma's solution.

Join our Discord community

Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!

Join our Discord

Stay up to datewith new challenges, featured solutions, selected articles, and our latest news

Frontend Mentor

  • Unlock Pro
  • Contact us
  • FAQs
  • Become a partner
  • Use cases

Explore

  • Learning paths
  • Challenges
  • Solutions
  • Articles

Community

  • Discord
  • Guidelines

For companies

  • Hire developers
  • Train developers
© Frontend Mentor 2019 - 2025
  • Terms
  • Cookie Policy
  • Privacy Policy
  • License