🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101

TV show search and watchlist

Search TV shows with the free TVMaze API, see details and cast, and keep a personal watchlist.

Beginner⏱ 6–10 hoursđŸĒœ 7 stepsReactViteTVMaze API

What you'll learn

  • ◆Components, props and state
  • ◆useEffect for data fetching
  • ◆Routing with React Router

What you'll build

  • ✓Debounced search
  • ✓Show detail page with cast and episodes
  • ✓Watchlist saved in localStorage
  • ✓Loading skeletons and error states

Step-by-step guide

  1. 1

    Set up

    npm create vite@latest shows -- --template react; npm i react-router-dom.

  2. 2

    Search

    Fetch https://api.tvmaze.com/search/shows?q=... ; debounce typing by 400 ms with setTimeout in useEffect (clear it in the cleanup).

  3. 3

    Results grid

    A ShowCard component (image, name, rating, genres); strip HTML from summaries.

  4. 4

    Detail route

    Route /show/:id fetching /shows/:id?embed[]=cast&embed[]=episodes; read id with useParams.

  5. 5

    Watchlist

    A custom hook useLocalStorage(key, initial) and a context so any component can add/remove shows.

  6. 6

    States

    Skeleton cards while loading; a friendly message for no results or network errors.

  7. 7

    Deploy

    npm run build and deploy the dist folder to Netlify or Vercel (add a SPA redirect rule).

🚀 Make it stand out

  • +Mark episodes as watched
  • +Infinite scroll for popular shows
  • +Write tests with Vitest and React Testing Library