The best way to learn is to build, so I’ve been diving deep into React and Next.js to master core frontend patterns. Over the last 48 hours, I successfully implemented: 1- Dynamic Search Filter: Mastering derived state for real-time results. 2- Theme Toggler: Implementing dark/light modes using state and Tailwind. 3- Pagination System: Understanding logic for handling large datasets efficiently. 4- Complex Shopping Cart: Deep dive into array methods like .reduce() for totals and .map() for quantity updates. It’s one thing to see these features on a site, but building them from scratch and managing "Complex State" has given me a whole new perspective on clean, scalable code. Onward to Day 4! #ReactJS #NextJS #WebDevelopment #FrontendDeveloper #LearningInPublic #Javascript
More Relevant Posts
-
Ever clicked two dropdowns and both stayed open at the same time? 😾 Looks unprofessional. Feels broken. Users hate it. Here is how I fixed it in React with just 2 lines : 👉 When Explore opens → force "Degree" dropdown to close onClick={() => { setIsExploreMenuOpen(!isExploreMenuOpen); setIsDegreeMenuOpen(false); // ← this one line does it }} 👉 When Degree opens → force "Explore" dropdown to close onClick={() => { setIsDegreeMenuOpen(!isDegreeMenuOpen); setIsExploreMenuOpen(false); // ← same idea }} The logic is simple: When you open something → explicitly close everything else. React does not do this automatically. You have to tell it exactly what to close. Small detail. Big difference in user experience. #react #nextjs #javascript #webdevelopment #tailwindcss #buildinpublic #frontenddevelopment
To view or add a comment, sign in
-
Syntax is easy, but making it responsive and scalable is where the real fun begins! 🚀 Today, I built a Professional Portfolio Footer for my React journey. While it looks like a simple footer, I focused on some core development principles: ✅ DRY (Don't Repeat Yourself): Instead of hardcoding 10+ links, I used the .map() method to render them dynamically from arrays. ✅ Mobile First: Used Flexbox logic to make sure the layout shifts perfectly from a 3-column desktop view to a single-column mobile view. ✅ Clean UI: Added smooth hover transitions and a consistent dark-theme color palette. Small wins like these are building my confidence to take on larger MERN stack projects. Slow and steady, but the logic is getting stronger every day! 💪 Check out the code in my repo:https://lnkd.in/gXKE66AF #ReactJS #WebDevelopment #Frontend #CodingLogic #MERNStack #CSS #LearningToCode
To view or add a comment, sign in
-
-
💡 useMemo vs useCallback — Same goal, different purpose! If you’ve ever been confused between these two React hooks, you’re not alone 😄 They both help with performance optimization… but they solve different problems. Let’s simplify 👇 🔹 useMemo → Caches a VALUE It remembers the result of a computation. 👉 Use it when: You have expensive calculations You don’t want them to run on every render Example: const filteredList = useMemo(() => { return items.filter(item => item.includes(search)); }, [items, search]); 🔹 useCallback → Caches a FUNCTION It remembers the function definition. 👉 Use it when: Passing functions to child components Preventing unnecessary re-renders Example: const handleClick = useCallback(() => { console.log("Clicked"); }, []); 🔁 Key Difference useMemo → “Save the RESULT” useCallback → “Save the FUNCTION” 🚀 Final Thought Think of it this way: If you're calculating something → useMemo If you're passing a function → useCallback Master this, and your React apps become more efficient and optimized 💪 #ReactJS #FrontendDevelopment #JavaScript #WebPerformance #CodingTips
To view or add a comment, sign in
-
Why is your useEffect sitting idle even after you've updated the variable? Look at this snippet. If you’re coming from a Vanilla JS background, count = count + 1 looks perfectly fine. But in React? This code is technically "dead." Why this won't work: * Mutation != Re-render: You are updating a local let variable. React has no "spy" watching your local variables. Unless you call a state setter (like setCount), React doesn't know it needs to re-render the component. * The Lifecycle Gap: useEffect only checks its dependency array ([count]) when the component re-renders. Since the button click doesn't trigger a render, React thinks nothing has changed. * The "Reset" Trap: Even if the component did re-render for some other reason, the first line let count = 0; would run again, resetting your value back to zero every single time. The Fix? Stop treating React like a standard script. Use useState. When you use const [count, setCount] = useState(0), you’re telling React: "Hey, keep an eye on this value. If I change it via setCount, please refresh the UI and check my Effects." Pro-tip: In React, if you want the UI to "react," you have to use the Hook. Simple as that. #ReactJS #WebDevelopment #Frontend #CodingTips #IndiaDevs #Javascript
To view or add a comment, sign in
-
-
Practicing React & JavaScript ✍ Built a simple shopping UI where I used: .map() to render products dynamically .filter() to handle category selection Starting to understand how real apps manage and display data. Next: improving cart functionality. #React #JavaScript #Frontend
To view or add a comment, sign in
-
-
The biggest shift in my frontend journey wasn’t learning a new syntax—it was completely changing my mental model. 🧠 When I first started working with React, shifting from imperative DOM manipulation to a declarative, component-driven approach felt like learning to write with my opposite hand. I had to stop thinking about how to change the UI, and start thinking about what the UI should look like for any given state. Now? I can’t imagine building web applications any other way. Here are three reasons React continues to be a staple in my tech stack: 1️⃣ Component Reusability: Building a robust design system and reusing logic across applications saves an incredible amount of time. 2️⃣ The Ecosystem: Whether it's Next.js for SSR, Zustand for state management, or Tailwind for styling, the tooling built around React is unmatched. 3️⃣ Continuous Evolution: From Class Components to Hooks, and now Server Components, the core team is never afraid to push the boundaries of what the web can do. What was your biggest "aha!" moment when you first started learning React? Let me know in the comments! 👇 #ReactJS #WebDevelopment #Frontend #JavaScript #SoftwareEngineering
To view or add a comment, sign in
-
🚀 Day 7 of Building React Projects Today I built a Weather Application using React.js. This project allows users to search for any city and view the current weather information using a weather API. ✨ Features: • Search weather by city name • Display temperature and weather condition • Shows weather icon • Simple and responsive UI • Real-time data using API 🛠 Tech Stack: React.js JavaScript HTML CSS Weather API 💻 Source Code: https://lnkd.in/dasKibUN #ReactJS #JavaScript #FrontendDevelopment #WebDevelopment #LearningInPublic
To view or add a comment, sign in
-
⚛️ Improving React Performance with Lazy Loading As React applications grow, the bundle size can increase significantly. Loading all components at once can slow down the initial page load and impact the user experience. React Lazy Loading helps solve this problem by loading components only when they are needed, instead of including everything in the main JavaScript bundle. With tools like "React.lazy()" and "Suspense", React can split the code and dynamically load components when a user navigates to them. Benefits of React Lazy Loading: • Smaller initial bundle size • Faster page load • Better performance on slower networks • Improved overall user experience Optimizing how and when components load is a key step in building scalable and high-performance React applications. Reference from 👉 Sheryians Coding School #React #WebDevelopment #Frontend #JavaScript #Performance #SoftwareEngineering
To view or add a comment, sign in
-
-
I made React slower trying to optimize it. Wrapped everything in useMemo. Added useCallback everywhere. Felt productive. Performance got worse. Here's what I didn't understand about re-renders 👇 4 things that trigger a re-render: > State change > Prop change > Parent re-renders (even if YOUR props didn't change) > Context update That third one is responsible of unnecessary re-renders I've seen in real codebases. The fix isn't memorizing APIs. It's this order: 1. Profile first Open React DevTools Profiler. Find the actual problem. Takes 2 minutes. 2. Wrap the right components in React.memo Not all of them. Only components that are expensive AND receive stable props. 3. Stabilise your functions with useCallback Without it - new function reference every render --> child always re-renders. Doesn't matter if you have React.memo. 4. useMemo for heavy calculations only Not for "this array map looks expensive." Only when Profiler proves it. The rule I follow now: Don't optimise what you haven't measured. One change in the right place beats 10 changes in the wrong ones. What's the most unnecessary useMemo you've ever written? 😄 #React #JavaScript #Frontend #WebDev
To view or add a comment, sign in
-
🚀 Starting a 10-part series on React things that make code harder than it needs to be. Not tutorials. Not “10 hooks you should know.” Just real patterns that show up in actual codebases and make simple work more annoying than it should be. Part 1: A lot of React problems are really state problems. Not React itself. Not JSX. Not even hooks most of the time. State living in too many places. Duplicated state. State doing jobs it was never supposed to do. That’s usually when an app starts feeling harder to reason about than it should. The more I work with React, the more I think good frontend code starts with good state decisions. If the state is messy, everything downstream gets harder: debugging feature work testing handoffs even basic collaboration Good React usually feels predictable. And predictable usually starts with state. What’s the most common state mistake you keep seeing? #React #ReactJS #StateManagement #FrontendEngineering #JavaScript #TypeScript #SoftwareEngineering
To view or add a comment, sign in
Explore content categories
- Career
- Productivity
- Finance
- Soft Skills & Emotional Intelligence
- Project Management
- Education
- Technology
- Leadership
- Ecommerce
- User Experience
- Recruitment & HR
- Customer Experience
- Real Estate
- Marketing
- Sales
- Retail & Merchandising
- Science
- Supply Chain Management
- Future Of Work
- Consulting
- Writing
- Economics
- Artificial Intelligence
- Employee Experience
- Workplace Trends
- Fundraising
- Networking
- Corporate Social Responsibility
- Negotiation
- Communication
- Engineering
- Hospitality & Tourism
- Business Strategy
- Change Management
- Organizational Culture
- Design
- Innovation
- Event Planning
- Training & Development
good job M