DEV Community

s1varam
s1varam

Posted on

Wordyl - Yet another Wordle clone!

After my first React project - Pokedex, it took a while before starting the next one. This time I made sure to learn and use functional components, since I used classes in the former one. Initially, I was so hesitant in switching to hooks, but once I got the hang of it, I found it to be easier than classes.

Now - what to build? Since I wanted to get familiar with hooks, I didn't want to build something complex. Hence I chose to build WORDYL - a simple clone of the sensational game everyone's playing right now (Wordle). Since I used Material UI in my previous app, I wanted to try something new and hence opted for Tailwind CSS.

What I built:

  1. Components : Gameboard (parent component that includes all the child components), Header, Keyboard, Letter-Tile, Modals.
  2. Used useState, useEffect and useContext hooks.
  3. Used word list from the og Wordle.
  4. Application theme based on device theme using useContext and ThemeProvider. Can also be changed manually.
  5. Doesn't have all functionalities of the og game like sharing guesses/ one day timer.
  6. Can be played unlimited number of times by hitting reset button.
  7. Stats displayed in the form of a graph - used ChartJS.
  8. Fancy confetti popup after guessing the correct word (react-confetti).
  9. Used compare-words npm package for comparing words.
  10. Data is stored in localStorage - so if site data is cleared, the progress would be lost.
  11. Used very minimal CSS in the places I found Tailwind to be a bit difficult.
  12. Used cogo-toast npm package for displaying toast messages.
  13. Responsive design.
  14. Tried using Framer Motion and Animate.css packages for animations, but unfortunately was unable to get them working as expected :/

Some snapshots of the application:

Game

Stats view

To-dos:

  1. Extend 5 letter words to more.
  2. Use keyboard for typing words.
  3. Add animations (like shake, pulse and reveal)
  4. Share progress
  5. Persistent user-data storage

You can find the source code here and you can play it here. Do star the repo if you like it! Suggestions are most welcome!

Top comments (0)