Skip to content

A Pokémon memory card game built to practice handling side effects and fetching data from APIs in React. It pulls data from PokéAPI.

Notifications You must be signed in to change notification settings

matthewaubert/memory-card

Repository files navigation

Memory Card

A Pokémon memory card game – try to select all twelve cards without repeating yourself! If you select the same card twice, it's game over and you'll have the option to play again.

Click here to view the live site!

screenshot of home page

How to Play

  1. Head to the live site on any device (mobile, tablet, or desktop – it doesn't matter)
  2. Click on each Pokémon card once (and only once!)
  3. If you're on desktop, enjoy the dynamic card animations as you hover over and select them. Nice!
  4. Try to select all twelve cards without any duplications, or else you'll have to start over
  5. Once you've caught all twelve, you win!
  6. Click on the ? icon if you need to review the instructions
  7. Click on the sound icon to enjoy some music while you play. Click on it again to pause the music.
  8. Play again as many times as you like! Each time, twelve Pokémon of the original 151 are randomly selected for you. So you can enjoy the game's replay value not knowing what will come up next!
gameplay.mp4

Project Objectives

This project was built in order to implement the React concepts I've learned thus far, including: components, JSX, keys, props, state, and effects. The main goal was to use hooks to manage and utilize state while fetching and using data from an external API.

I additionally decided to have even more fun with side effects and add some lively animations to the cards (using JavaScript and CSS in tandem), as shown in the video above. I has quite happy with the results and learned quite a bit. See the code at src/components/Card.jsx.

Technologies Used

Languages

  • JavaScript
  • CSS
  • HTML

Libraries and Tools

  • React
  • Vite – for project scaffolding and development
  • Git (obviously)

Credits

About

A Pokémon memory card game built to practice handling side effects and fetching data from APIs in React. It pulls data from PokéAPI.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published