โ ํผ๋๋ก
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
๋ต๊ธ ๋จ๊ธฐ๊ธฐ