ReactRouting & formsLesson 39 / 69

Build the reading-list app

Code Lab75 min

Build the reading-list app

The project: search books, save them to lists, mark them read.

Everything in this course is in it: components composing, state lifted for the search query, an effect fetching results, loading and error states, routes for list vs. detail, a controlled form for adding a book.

Build it in this order:

  1. 1.Static version with fake data.
  2. 2.Lift the search state; filter the fake data.
  3. 3.Swap in the real fetch (this app's /roadmaps API works if you need one).
  4. 4.Add routes and the add-book form.

When step 4 works, you have written React the way working teams do.

Exercise

Build the app above. Requirements: search with live results, saved-list state, loading/error states on fetch, two routes, validated add-book form.

Practice this lesson in the IDE

Open the React practice workspace, edit the starter code, and run your work in the browser.

Open IDE and practice