Back to work

Pokédex

A Pokédex that explores the first 151 Pokémon with types, weight, moves, and evolution chains.

Date
Apr 2026
Category
Frontend
Status
Live

Stack

  • React
  • TypeScript
  • Vite
  • Tailwind CSS
  • Zustand
Cover of Pokédex, category Frontend

Problem

Looking up the first 151 Pokémon in PokeAPI means combining the listing, each species' detail, and a nested evolution tree. The application had to present that information without repeating the loading logic in every view.

Role

I developed the application with React, TypeScript, Vite, and Zustand: the PokeAPI integration, centralized state, validation schemas, and the listing and detail views.

Decisions

  1. A centralized Zustand store.

    usePokemonsStore holds the list, the active Pokémon, the evolution chain, and the error, with loading actions inside the store. Partial updates through set() keep the state typed and avoid duplicating fetch logic in the views.

  2. A recursive evolution chain parser.

    extractEvolutionChain traverses the recursive EvolutionNode type with depth-first search, turns the PokeAPI tree into a flat array, and processes every branch with forEach.

  3. Separate service, schemas, and views.

    Requests live in services/pokeapi.ts, Zod schemas validate the data shape, and route.tsx connects Home and Pokemon. Loading, error, and footer components cover the interface states.

  4. Navigation between listing and detail.

    The home page shows the 151 Pokémon in a grid, and each detail page offers types, weight, moves, and evolutions, with buttons to return home or to the previous page.

Result

The Pokédex lists the first 151 Pokémon, shows each detail with type badges and an evolution chain, and covers loading, error, and navigation states between the two views.