How arshakyan998/online-shop-pizzas-on-react-redux works
This is a React pizza-ordering storefront. Users browse a remotely served pizza catalog, filter by category and sort order, choose size and crust, add pizzas to a cart, then adjust or clear cart contents. Redux coordinates catalog, filter, and cart state. The README identifies a JSON Server backed by public/db.JSON, but the sampled fetch helper does not expose its request details; unsampled wiring is therefore shown only where repository references or documentation support it.
Main entry points: Pizzas.jsx Pizza list · root.js Redux store · App.js Route shell · Cart.jsx Cart page
Components 19
Storefront UI
- Route shell
src/App.js - Cart summary
src/components/header/Header.jsx - Cart page
src/components/main/cart/Cart.jsx
Catalog browsing
- Catalog entry
src/components/main/pizzaBlock/GetPizzasItem.jsx - Category and sort
src/components/main/menu/Menu.jsx - Pizza list
src/components/main/pizzaBlock/Pizzas.jsx - Pizza options
src/components/main/pizzaBlock/RenderPizzas.jsx - Loading placeholder
src/components/main/pizzaBlock/LodingBlock.jsx
Redux state
- Filter actions
src/redux/actions/filter.js - Filter state
src/redux/rducers/filter.js - Catalog actions
src/redux/actions/pizzas.js - Catalog state
src/redux/rducers/pizzas.js - Cart actions
src/redux/actions/cart.js - Cart state
src/redux/rducers/cart.js - Redux store
src/redux/root.js
Catalog data
- Catalog fetch
src/redux/actions/fetchApi.js - JSON Server
- Pizza data
public/db.JSON
Other components
- Shopper
Connections 26
- Shopper → Route shell: opens storefront
src/App.js - Route shell → Cart summary: renders
src/App.js - Route shell → Catalog entry: routes home
src/App.js - Route shell → Cart page: routes cart
src/App.js - Catalog entry → Category and sort: renders
src/components/main/pizzaBlock/GetPizzasItem.jsx - Catalog entry → Pizza list: renders
src/components/main/pizzaBlock/GetPizzasItem.jsx - Category and sort → Filter actions: dispatches
src/components/main/menu/Menu.jsx - Filter actions → Filter state: updates
- Pizza list → Redux store: selects state
src/components/main/pizzaBlock/Pizzas.jsx - Pizza list → Filter state: reads filters
src/components/main/pizzaBlock/Pizzas.jsx - Pizza list → Catalog actions: dispatches fetch
src/components/main/pizzaBlock/Pizzas.jsx - Catalog actions → Catalog fetch: requests catalog
src/redux/actions/pizzas.js - Catalog fetch → JSON Server: loads data
- JSON Server → Pizza data: serves JSON
README.md - Catalog actions → Catalog state: sets pizzas
- Pizza list → Pizza options: renders items
src/components/main/pizzaBlock/Pizzas.jsx - Pizza list → Loading placeholder: renders while loading
src/components/main/pizzaBlock/Pizzas.jsx - Pizza options → Pizza list: adds selected pizza
src/components/main/pizzaBlock/Pizzas.jsx - Pizza list → Cart actions: dispatches add
src/components/main/pizzaBlock/Pizzas.jsx - Cart page → Cart actions: dispatches changes
src/components/main/cart/Cart.jsx - Cart summary → Redux store: selects totals
- Cart page → Redux store: selects cart
- Cart actions → Cart state: updates cart
- Redux store → Filter state: combines reducer
src/redux/root.js - Redux store → Catalog state: combines reducer
src/redux/root.js - Redux store → Cart state: combines reducer
src/redux/root.js