Today I explored some important concepts in React that make apps more scalable and dynamic. 🔹 Learned Context API to manage global state 🔹 Worked with React Router DOM for navigation 🔹 Implemented routing using RouterProvider and createBrowserRouter 🔹 Built multiple pages: Home, About, Contact 🔹 Learned how to navigate between pages smoothly 🔹 Extracted dynamic parameters (like id) from URL 🔹 Fetched real data from GitHub API (followers) 🔗 GitHub Profile: https://lnkd.in/gMurynAg 📌 Key takeaway: Understanding routing + global state is a big step toward building real-world React applications. #React #WebDevelopment #JavaScript #Frontend #LearningInPublic #100DaysOfCode
More Relevant Posts
-
🚀 Day 977 of #1000DaysOfCode ✨ New Hooks in React 19 You Should Know React 19 is bringing some powerful changes — especially when it comes to how we manage state and async logic. In today’s post, I’ve covered the new hooks introduced in React 19 and how they simplify common patterns that previously required extra code or libraries. From better handling of async actions to improved form management and smoother UI updates, these hooks are designed to reduce boilerplate and make your code more intuitive. What’s exciting is that these are not just new APIs — they actually change how you think about building React applications. I’ve explained them in a simple and practical way so you can start using them without confusion. If you’re working with React or planning to upgrade, understanding these hooks will give you a clear advantage. 👇 Which new React 19 hook are you most excited to try? #Day977 #learningoftheday #1000daysofcodingchallenge #FrontendDevelopment #WebDevelopment #JavaScript #React #CodingCommunity #ReactJS
To view or add a comment, sign in
-
State management is where most frontend apps start getting messy. It’s not about choosing a library — it’s about choosing the right type of state. I’ve seen teams overcomplicate things by: Using Redux for everything Mixing API data with UI state Making simple flows hard to debug So here’s a better way 👇 🔹 Part 2: State Management (Redux vs Context vs Server State) Local state → keep it simple Global state → structure it well Server state → handle it separately Read here 👇 https://lnkd.in/gsTrJDHR Next: Folder Structure (Feature vs Layer — what actually scales) #frontend #reactjs #systemdesign #webdevelopment #javascript
To view or add a comment, sign in
-
Code splitting and Tree shaking. They solve different problems 👇 🧹 Tree Shaking Removes unused code at build time using static analysis of imports/exports. ➡️ Result: Smaller bundle 📦 Code Splitting Breaks your app into chunks using dynamic import() or routes. ➡️ Result: Load only what’s needed, when it’s needed ⸻ 💡 Simple way to remember: • Tree shaking = remove extra code • Code splitting = delay loading code ⸻ ⚡ Best performance comes from using both together: Small bundles + smarter loading = faster apps ⸻ Are you optimizing for size, delivery… or both? #Frontend #WebPerformance #JavaScript #ReactJS #CodeSplitting #TreeShaking #WebDevelopment #PerformanceOptimization #SoftwareEngineering
To view or add a comment, sign in
-
We had a React page that kept getting slower over time. No obvious bug. Just gradual performance drop. Here’s what we found 👇 Problem: → Page slowed down after repeated navigation → Memory usage kept increasing Root cause: → Event listeners not cleaned up → setInterval running in background → useEffect cleanup missing What I did: → Added proper cleanup functions → Removed unnecessary subscriptions → Ensured effects were scoped correctly Result: → Stable performance → No memory growth → Better user experience Insight: React doesn’t manage side effects for you. If you don’t clean up… Your app pays the price later. #ReactJS #MemoryLeak #Frontend #SoftwareEngineering #CaseStudy #JavaScript #Debugging #WebDevelopment #Engineering #Performance #FrontendDeveloper
To view or add a comment, sign in
-
🚀 Master React Router in Minutes! Here’s a simple breakdown of everything you need to know: ✅ What is Routing ✅ SPA Concept ✅ Static vs Dynamic Routes ✅ useParams() ✅ Protected Routes 💡 Key Takeaways: React uses SPA (Single Page Application) Routing helps display components based on URL Dynamic routes make apps scalable Protected routes secure your app 📌 If you're learning React, this is a must-know concept! Let me know in comments 👇 What topic should I cover next? #React #WebDevelopment #Frontend #JavaScript #ReactJS #Coding #LearnToCode
To view or add a comment, sign in
-
Your React app isn’t slow. Your architecture is. Most performance issues don’t come from React itself. They come from: • unnecessary re-renders • oversized bundles • uncontrolled API calls • unmeasured performance Here are 5 optimization techniques developers often ignore, but shouldn’t. Because performance isn’t something you “add later.” It’s something you design for. What’s the most frustrating performance issue you’ve debugged? SRK signing off! 💛 #ReactJS #FrontendDevelopment #WebPerformance #JavaScript #SoftwareEngineering
To view or add a comment, sign in
-
⚛️ You can finally delete <Context.Provider> 👇 For years, the Context API introduced a small but persistent redundancy. We defined a Context object, yet we couldn’t render it directly—we had to access the .Provider property every single time. ⚛️ React 19 removes this requirement. ❌ The Old Way: UserContext.Provider It often felt like an implementation detail leaking into JSX. Forget .Provider, and your app might silently fail or behave unexpectedly. ✅ The Modern Way: <UserContext> The Context object itself is now a valid React component. Just render it directly. Why this matters ❓ 📉 Less Noise — Cleaner JSX, especially with deeply nested providers 🧠 More Intuitive — Matches how we think: “wrap this in UserContext” 💡 Note: Note: <Context.Consumer> is also largely dead in favor of the use hook or useContext. Starting in React 19, you can render <SomeContext> as a provider. In older versions of React, use <SomeContext.Provider>. #React #JavaScript #WebDevelopment #Frontend #React19
To view or add a comment, sign in
-
-
🚀 Ever wondered what really happens behind the scenes in React? We’ve published a deep-dive guide that breaks down how React works internally beyond just components and props. From the Virtual DOM to the reconciliation algorithm, and from the powerful Fiber architecture to rendering phases and hooks, this blog explains how React efficiently updates the UI while keeping performance optimized. Whether you're building scalable applications or looking to strengthen your fundamentals, this guide offers clear, real-world insights into React’s core mechanics. 💡 Learn how React makes smart decisions to update only what’s necessary and why it matters for your applications. 👉 Read the full blog by Sachin Saxena and level up your React expertise: https://lnkd.in/gzTQaAj3 #ReactJS #WebDevelopment #Frontend #JavaScript #SoftwareEngineering #Performance #TechBlog
To view or add a comment, sign in
-
-
Your Webpack Module Federation setup works perfectly in development. Five micro frontends, all loading seamlessly. Then you check the Network tab. Five copies of React. Five copies of ReactDOM. Five copies of React Router. 2.5MB of duplicated JavaScript the browser downloads, parses, and executes for zero reason. But the real problem is not performance. It is this error: "Invalid hook call. You might have more than one copy of React in the same app." Two React instances = two hook registries. A component rendered by React #1 cannot call hooks from React #2. Your entire app crashes. The fix: Module Federation's shared config with the singleton pattern. Here's what I cover in the full guide: 1. Why sharing dependencies cuts bundle size by 57% (real numbers) 2. What singleton: true actually does at runtime (step-by-step) 3. requiredVersion vs strictVersion vs eager - when to use each 4. Why the host shares more dependencies than remotes 5. React vs Next.js shared config differences (eager: false matters) 6. What you should share (React, Redux) vs what you should NOT (lodash, date-fns) 7. How to debug shared deps with __webpack_share_scopes__ in DevTools Every code example is from a production micro frontend monorepo with multiple remotes. Read the full guide: https://lnkd.in/ggcubTC5 #MicroFrontend #ModuleFederation #Webpack5 #ReactJS #JavaScript #WebDev #FrontendArchitecture #SingletonPattern #WebPerformance #Monorepo #SrinuDesetti
To view or add a comment, sign in
-
-
Everyone says use React.lazy. Here's when it actually makes things worse. React.lazy splits your bundle. That sounds good on paper. But there's a hidden cost: → Waterfalls → Layout shift → Spinner hell on fast connections I've seen apps where lazy-loading a modal added 400ms of perceived lag — on a 100ms network. Why? Because the component fetch only starts when the user triggers it. By then it's already too late. 𝗧𝗵𝗲 𝗳𝗶𝘅 𝗶𝘀𝗻'𝘁 𝘁𝗼 𝘀𝘁𝗼𝗽 𝘂𝘀𝗶𝗻𝗴 𝗥𝗲𝗮𝗰𝘁.𝗹𝗮𝘇𝘆. 𝗜𝘁'𝘀 𝘁𝗼 𝗸𝗻𝗼𝘄 𝘄𝗵𝗲𝗻 𝘁𝗼 𝗽𝗿𝗲𝗳𝗲𝘁𝗰𝗵. Call your import() on onMouseEnter — not on render. The chunk loads in the ~200ms before the click lands. By the time the modal opens, it's already there. If a user is likely to click something within 3 seconds of landing on a page — don't lazy load it. Preload it instead. React.lazy is a network tool. Treat it like one. What did you lazy-load that you later regretted? #ReactJS #Frontend #WebPerformance #JavaScript #WebDev
To view or add a comment, sign in
-
Explore related topics
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