If this snippet makes you pause 🤔 - what gets logged in the console, then it’s a sign to revisit the core fundamentals of React Hooks. This isn’t about memorizing hooks, It’s about truly understanding: • How closures affect useCallback • And why dependency arrays can quietly break your logic React isn’t hard but misunderstanding these basics is where most bugs come from. Take a minute. Predict the output and let me know in the comments. That’s how you level up 🚀 #React #Frontend #JavaScript #WebDevelopment #SoftwareEngineering #ReactHooks #LearnInPublic
Farooq Khan’s Post
More Relevant Posts
-
Think you know JavaScript? Explain this output! 👇 What gets printed to the console? A) undefined, 10, 10, 10 B) ReferenceError, 10, 10, 20 C) undefined, 10, 10, 20 D) undefined, 10, 20, 10 #Technology #JavaScript #SoftwareEngineering #WebDevelopment #ProgrammingRiddles #WebDev #Frontend #ReactJS #CleanCode #ProgrammingTips
To view or add a comment, sign in
-
-
Most developers use fetch without ever canceling it. That means: stale responses overwriting fresh ones, memory leaks in unmounted components, and race conditions that are hell to debug. AbortController fixes all of this — and it's been native since ES2017. Two main use cases: 1. Cancel on component unmount — so old requests don't update state after a user navigated away. 2. Cancel on new request — so if a user types fast in a search field, only the last request wins. No library needed. Do you use AbortController in your projects? 👇 #JavaScript #WebDevelopment #Frontend #JS #SoftwareEngineering
To view or add a comment, sign in
-
-
Most developers use fetch without ever canceling it. That means: stale responses overwriting fresh ones, memory leaks in unmounted components, and race conditions that are hell to debug. AbortController fixes all of this — and it's been native since ES2017. Two main use cases: 1. Cancel on component unmount — so old requests don't update state after a user navigated away. 2. Cancel on new request — so if a user types fast in a search field, only the last request wins. No library needed. Do you use AbortController in your projects? 👇 #JavaScript #WebDevelopment #Frontend #JS #SoftwareEngineering
To view or add a comment, sign in
-
-
⚛️ React 19.2 : Smarter State, Less Hassle In this Q&A, Faris Aziz explains how React 19.2 enables background rendering—so you can keep component state even when it’s not visible, simplifying state management. ✨ What you’ll learn: • Keep state without complex workarounds • Render components in the background • Reduce lifecycle & cleanup complexity Don’t miss this if you want to stay ahead with modern React 👀 👉 Explore the full program: https://lnkd.in/dfSdRXcX #React #JavaScript #WebDevelopment #Frontend #TechTalk #iJSConf
To view or add a comment, sign in
-
just published part 2 of my React internals series , this one covers what actually happens when you call setState and how does re-rendering works. part 1 (initial render): https://lnkd.in/dycpqavw part 2 (re-render): https://lnkd.in/d4tWTwmk #react #javascript #frontend #webdev
To view or add a comment, sign in
-
💡 Today I learned something that changed how I think about performance in React… I was working on a simple search input, and everything seemed fine… until I realized something Every single keystroke was triggering an API call That means: 👉 Too many requests 👉 Unnecessary load on the server 👉 A less smooth user experience That’s when I remembered 𝗱𝗲𝗯𝗼𝘂𝗻𝗰𝗶𝗻𝗴 Instead of calling the API on every key press, I added a small delay. Now, the function only runs when the user stops typing for a moment ✨ The result? Fewer API calls Better performance Cleaner and more efficient code Sometimes, it’s not about big changes… but small improvements that make a real difference Have you ever faced this kind of issue? 👇 #React #WebDevelopment #JavaScript #Frontend #Performance #LearningJourney
To view or add a comment, sign in
-
🚀 Most devs use Next.js every day but don't fully understand what happens under the hood. Let me break down Server vs Client Components in 60 seconds — and what the RSC Payload actually is. 🖥️ On the Server Next.js splits rendering by route segment (layouts + pages). → Server Components → rendered into an RSC Payload → Client Components + RSC Payload → prerendered HTML 📦 What is the RSC Payload? A compact binary representation of your Server Component tree. It contains 3 things: ✅ Rendered result of Server Components ✅ Placeholders + JS references for Client Components ✅ Props passed from Server → Client Components 💡 Why does this matter? React uses the RSC Payload on the client to update the DOM — not re-render everything from scratch. That's how Next.js gives you fast, seamless navigations while keeping server-rendered content fresh. Understanding this model helps you: → Write leaner bundles (keep logic server-side) → Pass props correctly across the boundary → Avoid hydration mismatches that are hard to debug #NextJS #React #WebDev #Frontend #JavaScript #ImmediateJoiner #CoreWebVitals
To view or add a comment, sign in
-
Deeply nested state updates in React are a silent productivity killer. If you've ever spent 10–15 minutes updating one tiny value inside a nested object you already know the pain. I used to mutate nested state directly — until it started affecting performance, debugging time, and even load time optimizations. Here’s a simple mindset shift that made my frontend code cleaner and easier to scale #React #FrontendDevelopment #ReactJS #JavaScript #useReducer #StateManagement #ReactHooks
To view or add a comment, sign in
-
Debugged a Next.js hydration issue that wasn’t caused by application code, but by a browser extension mutating the DOM before React hydration. Captured the breakdown and debugging approach in this short carousel. Key reminder: when working with SSR, the browser environment is part of the runtime — not just your code. #NextJS #ReactJS #Frontend #SoftwareEngineering #Debugging #JavaScript
To view or add a comment, sign in
-
Built two practical React features today: • Back to Top • URL Validation Solved on Namaste Dev Platform NamasteDev.com sir Akshay Saini 🚀 Focused on clean logic, reusable components, and real-world usability. Consistent small wins → long-term growth. #ReactJS #Frontend #JavaScript #WebDevelopment #LearningInPublic
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