How dvasyliev/react-crash-course works
This React product-list app lets a user browse sample products, expand specifications, mark favorites, buy one or two items, and filter a separate product listing by price. App owns product, favorite, and filter state; it renders the product cards and filter controls, which send user actions back through callbacks. The catalog is local sample data, and the entry point mounts the app and invokes optional web-vitals reporting. The source excerpts show these core interactions; asset contents and runtime behavior beyond the shown code are not inspected.
Main entry points: App.js App state and filtering · ProductCard.js Product card · ProductFilter.js Price filter · index.js React entry point
Components 9
App entry and metrics
- React entry point
src/index.js - Web vitals reporting
src/reportWebVitals.js
Product experience
- App state and filtering
src/App.js - Product list
src/components/ProductList.js - Product card
src/components/ProductCard.js - Price filter
src/components/ProductFilter.js
Catalog data and assets
- Sample products
src/data/products.js - Product images
public/images
Other components
- Shopper
Connections 11
- React entry point → App state and filtering: mounts
src/index.js - React entry point → Web vitals reporting: invokes
src/index.js - App state and filtering → Sample products: loads
src/App.js - App state and filtering → Product list: renders
src/App.js - App state and filtering → Product card: renders with callbacks
src/App.js - App state and filtering → Price filter: renders with filters
src/App.js - Product card → App state and filtering: calls purchase and favorite handlers
src/components/ProductCard.js - Price filter → App state and filtering: calls filter handler
src/components/ProductFilter.js - Sample products → Product images: references image paths
src/data/products.js - Shopper → Product card: interacts with
- Shopper → Price filter: sets price range