React.js Pokédex

Skills used:

  • JavaScript
  • React.js

The Pokédex uses a fetch request to pull data from PokéAPI. The data is then saved to local storage as an array of objects to speed up future loading times.

I chose to continue using the API on the initial load instead of the already gathered data. This is so that when there are more Pokémon inevitably added to the API, the program will be able to update itself, rather than me having to go in and update the array every time that a new Pokémon game comes out.

The Pokédex uses React’s useState function and a custom sortData function to dynamically update which cards are displayed on the screen.

The biggest issue facing this project is the extensive initial loading time, especially on mobile devices. My current ideas for fixing this issue are as follows: Hard coding the fetched data and checking for additional Pokémon with an API call. Having an initial API call that fetches the metadata, then making additional calls when the data is needed. Checking the API documentation to see if it is possible to combine API calls that are related by the Pokémon itself.