DEV Community

Ali Hamza
Ali Hamza

Posted on

Day 156 of Learning MERN Stack

Hello Dev Community! 👋

It is officially Day 156 of my software engineering track! Today, I successfully expanded Tomato — The Food Delivery App by integrating rich visual layers: rendering dynamic dummy product cards, a seamless mobile promotion section, and a beautiful dark-themed footer! 🍕🥗📱

Here is how I structured the frontend component patterns today.


🛠️ Deconstructing the Day 156 Dynamic Additions

As showcased in the active live browser views in "Screenshot (371).jpg" through "Screenshot (373).png", the interface is growing into a production-level application:

1. The Interactive Add-to-Cart Counter

  • On the product grid cards, instead of using bulky inputs, I built a micro-interaction pattern:
    • When an item is unselected, a clean, circular + button floats absolute on the image.
    • Once clicked, it instantly transforms into a state-bound controller: [- | count | +].
  • Each card dynamically maps its descriptive features, pricing attributes, and 5-star ranking vectors elegantly.

2. App Store Promotion Banner

  • Designed a responsive marketing section targeting mobile conversions ("For Better Experience Download Tomato App").
  • Centered layouts with high-contrast download badges ensure maximum click-through rates while keeping clean, negative space.

3. Professional Multi-Column Footer Grid

  • Social Identity: Left column houses the brand logo, dummy description, and social linkage wrappers (Facebook, Twitter, LinkedIn icons).
  • Navigation Tree: Structured company pathways (Home, About Us, Delivery, Privacy Policy) aligned neatly.
  • Direct Contacts: Houses rapid contact support coordinates with a clean, low-opacity copyright bar closing the viewport.

💡 The Technical Win: Reusable Functional States

By linking the add-to-cart state dynamically to individual product IDs, clicking one item counter updates only that specific food card's state without causing unnecessary re-renders across the entire layout array!


🎯 Target Milestones for Tomorrow (Day 157)

  • Setting up global React Context API (StoreContext) to manage cart item arrays globally!
  • Wiring actual cart calculation handlers to sum prices across multiple different food items.

💬 Let's Connect!

To all frontend engineers: When building cart counters on item grids, do you prefer using local state inside the card itself, or do you lift the state up immediately to global state managers like Context API or Redux? Let's discuss backend status architectures below!

My active repository updates daily on GitHub!
[Links in the Comments]

Day 156 secured. The homepage looks absolutely stellar and feels complete! Tomorrow, we dive deep into global state architectures! 🚀🍔🔥

Top comments (0)