AI Hints
Home›React Tutorial›Debugging and the Project Plan
React · Lesson 90 of 120

Project: The Plan

Northwind shop.

⏱ 2 min read▶ Video at 1:16:58🎓 Free
Watch this lesson in the React courseWatch on YouTube ↗Full React course

Time to build a real app. A shop for Northwind Bikes. Customers can browse products, search, open a product page, fill a cart, and check out.

  • A real app
  • Northwind Bikes
  • Browse to checkout

The component tree

App sets up the cart and the routes. A layout draws the header on every page. Inside it, a page appears. The product list, a product page, the cart, or checkout.

App
Layout
Pages

The files

The api file stands in for the server. The cart reducer and cart context manage the cart. Product list and product card show products. The cart panel and checkout handle buying. And App ties it all together.

FileJob
api.jspretend server
cartReducer.jscart logic
CartContext.jsxshare the cart
ProductList.jsxbrowse and search
CartPanel.jsxwhat's inside
Checkout.jsxplace the order

Using what we learned

State and reducers for the cart. Context to share it. Effects to load data. Custom hooks, routing, forms, and validation. Almost everything from this course appears.

keyvalue
CartuseReducer + context
Dataeffects
PagesReact Router
Checkoutforms, validation

Summary

We have a plan, a tree, and a list of files. Next, the product data.

Key takeaways
  • Components
  • Files
  • Plan
Next up: Project: Product Data — a fake API