Day 155 of Learning MERN Stack

์ž‘์„ฑ์ž

์นดํ…Œ๊ณ ๋ฆฌ:

โ† ํ”ผ๋“œ๋กœ
DEV Community ยท Ali Hamza ยท 2026-07-16 ๊ฐœ๋ฐœ(SW)

Ali Hamza

Hello Dev Community! ๐Ÿ‘‹

It is officially Day 155 of my software engineering track! Today, I brought the interactive catalog of Tomato โ€” The Food Delivery App to life by designing a dynamic, state-driven Explore Menu component (ExploreMenu.jsx)! ๐Ÿฅ—๐Ÿฉ๐Ÿ•

Providing users with responsive visual feedback as they browse menus is critical for high-conversion web designs. Here is how I set up the filtering architecture.

๐Ÿ› ๏ธ Inside the Day 155 Category Filter System

As captured in my code editor and browser views in “Screenshot (369).jpg” and “Screenshot (370).png”, the setup relies on a reliable structural flow:

1. Unified State Uplifting (Prop Passing)

  • Instead of keeping selection state locked inside the child component, I passed the states down:

javascript
  function ExploreMenu({ category, setCategory }) {  onClick={() => setCategory(prev => prev === item.menu_name ? "All" : item.menu_name)}

Enter fullscreen mode Exit fullscreen mode

์›๋ฌธ์—์„œ ๊ณ„์† โ†—

์ถ”์ถœ ๋ณธ๋ฌธ ยท ์ถœ์ฒ˜: dev.to ยท https://dev.to/ali_hamza_589ec7b3eb6688d/day-155-of-learning-mern-stack-49jg

์ฝ”๋ฉ˜ํŠธ

๋‹ต๊ธ€ ๋‚จ๊ธฐ๊ธฐ

์ด๋ฉ”์ผ ์ฃผ์†Œ๋Š” ๊ณต๊ฐœ๋˜์ง€ ์•Š์Šต๋‹ˆ๋‹ค. ํ•„์ˆ˜ ํ•„๋“œ๋Š” *๋กœ ํ‘œ์‹œ๋ฉ๋‹ˆ๋‹ค