Poke Finder allows you to search for any of the 905 available Pokemon! This is done by accessing Pokemon information available through the free to use Poke API! You'll be able to see any of your favorite Pokemon in our beautiful light or dark modes.
The main inspiration for this site was Serebii and Bulbapedia. I wanted to create something similar to them. When looking through free APIs, I came across the Poke API. After reading its documentation and getting a better idea of how the API worked, I knew this API was perfect for this form of application.
The hardest part of any application is knowing where you want to go. I started figuring this out by taking inspiration from Serebii. I used this to start my design process. I start from the mobile view and building up to desktop. This allows me to add in more content as the screen gets bigger. From the start, I wanted to have light and dark mode for the site. I used TailwindCSS for styling and they make it easy to do this.
In tailwind, you have a configuration file. In the configuration, you can set the property darkMode
to"class"
. What this does is activate dark mode by putting a class of dark
on the body. A toggle component is all that was needed to add or take away the dark mode.
The pokedex page is the most complex of the pages on the site. It uses two types of filtering to display the data you want. You can filter by a Pokemon's name or by its type. Each type of filtering can work alone or be used in conjunction with the other.When you find the pokemon you want to know more about, just click on its row and you'll be taken to its page.
Every Pokemon page is dynamically generated. This was done by using React Router. When the rows on the pokedex page are created, the link points to a page associated with their id. React Router provides a hook called useParams()
. We are able to pull this id from the URL and make a request to the API.
There were a lot of challenges that went into getting the data I needed.
Once having the data, I wasn't out of the woods yet. The data that was extracted needed to be formatted properly. Some of the data that need formatted was:
#
also needed to be pre-pended after the zeros were added.special-defense
. This needed to be converted to SP. DEF
.-
between words. The hyphens needed to be replaced with spaces.Create React App
with Next.js