Getting back into a rhythm after a long break isn't always glamorous. You open VS Code, stare at a blank file, and just start, no perfect conditions, no grand plan. That's been my approach lately, and it's working. Project 4 is done. Here's what it is: https://lnkd.in/dSYzJWbg Product Card UI - Add to Cart App A fully functional product listing page with a cart sidebar, the kind of UI you see on real e-commerce sites, built from scratch in React. What it does: → Displays a product grid with images, ratings, and categories → Add to cart with live quantity controls (+/−) → Cart persists across page refreshes via localStorage → Calculates and updates total price in real time → Checkout flow with a success confirmation screen Tech used: → React (Vite) — component-based architecture → Tailwind CSS — custom design tokens, dark theme → localStorage — client-side cart persistence → Custom React Hook (useCart) — all cart logic isolated What I learned: → Lifting state up — keeping cart state in App.jsx and passing it down via props, rather than scattering state across components → Custom hooks — extracting cart logic into useCart.js keeps components clean and focused on UI only → Component architecture — each component has one job. ProductCard displays. Cart renders. useCart thinks. → localStorage sync with useEffect — reading on mount, writing on every state change This is Project 4 of my structured React learning path. Building in public. More coming. #React #JavaScript #TailwindCSS #Frontend #WebDevelopment #BuildInPublic #MERN #Fullstack #Developer

To view or add a comment, sign in

Explore content categories