🚀 30 Days — 30 Coding Mistakes Beginners Make Day 19/30 I left a page… and React threw a scary warning 😐 “Can't perform a state update on an unmounted component” I wasn’t even touching state. The real culprit? setTimeout. The user navigated away, but the timer still executed and tried updating state. Component gone ❌ Timer still running ✔️ Fix 👇 return () => clearTimeout(timer) Always clean up inside `useEffect`. Timers, listeners, and API calls must be cancelled. Small habit. Prevents huge debugging sessions. Have you faced this warning? #30DaysOfCode #reactjs #javascript #frontend #codeinuse
Gourav Jadhav’s Post
More Relevant Posts
-
Mistake Post (useReducer) A mistake I made while learning React. I used 10+ useState hooks in a single component. The result? • confusing updates • hard-to-track logic • difficult debugging Everything looked fine at first, but as the component grew, the state management became chaotic. The solution I discovered later was useReducer. It centralizes all state updates into a single reducer function and uses actions to update the state. The component suddenly became much easier to understand. Lesson learned: useState for simple state useReducer for complex state logic HashTag: #reducer #useReducer #react #JavaScript
To view or add a comment, sign in
-
-
Just practiced a small React concept today. Created student cards using an array and displayed first, middle, and last names with "props". Also used a function component which gets recalled to render multiple cards, making the code reusable. Learning step by step. 💻 #React #JavaScript #FrontendDevelopment #LearningByDoing #CodingPractice
To view or add a comment, sign in
-
🚀 30 Days — 30 Coding Mistakes Beginners Make Day 18/30 I clicked “Add Item”… nothing happened 😐 No error. No warning. Button worked. My code: items.push("New Task") setItems(items) The array DID change. But React didn’t update UI. Why? Because React doesn’t check contents. React checks references. Same array reference = React thinks nothing changed. Fix 👇 setItems([...items, "New Task"]) Create a NEW array instead of modifying the old one. This single mistake causes many: “React state not updating” moments. Save this — you will hit this bug in a real project. #30DaysOfCode #reactjs #javascript #frontend #codeinuse
To view or add a comment, sign in
-
-
📚 Today’s Learning – React Strict Mode 1.It runs additional checks and warnings for unsafe lifecycle methods, unexpected side effects, and deprecated APIs. 2.One interesting behavior is that components may render twice in development to help detect side effects. 💡 Key takeaway: Strict Mode doesn’t affect production builds, but it helps catch bugs early during development and encourages writing safer, cleaner React code. #ReactJS #FrontendDevelopment #WebDevelopment #JavaScript #CodingJourney #LearnInPublic
To view or add a comment, sign in
-
-
One of the biggest mistakes new developers make is skipping the documentation. Tutorials are helpful, but official documentation gives you the real understanding of how a framework or library works. When you read the docs, you learn: • Best practices • Real examples • Advanced features • Proper implementation Every great developer I know spends time in the documentation first. 💡 Pro tip: If you want to master tools like React, Next.js, or Vue, make documentation your best friend. What do you prefer? Docs or tutorials? #WebDevelopment #Programming #DeveloperTips #FrontendDeveloper #JavaScript #CodingJourney
To view or add a comment, sign in
-
-
I just published my first VS Code Extension to make coding a lot more fun! 🎉 It's a fun project called "NICE on Success". It basically plays random meme sounds the moment you finish executing tasks or typing commands in your VS Code terminal. 🔊😂 If you don't mind, check it out, it could be fun! [https://lnkd.in/eScMvb9r] #VSCode #VSCodeExtension #JavaScript #TypeScript #JS #TS #ProgrammingMemes #DeveloperHumor #WebDevelopment #CodingLife
To view or add a comment, sign in
-
🚀 Day 934 of #1000DaysOfCode ✨ State vs Props in React — Clear & Practical Difference If you’re learning React, one of the first concepts that can feel confusing is State vs Props. In today’s post, I’ve explained the difference between state and props in React in a simple and practical way. You’ll understand how data flows between components, when to use state, and when props are the right choice. Mastering this distinction is crucial for building predictable and well-structured React applications. 👇 What confused you more when you started with React — state or props? #Day934 #learningoftheday #1000daysofcodingchallenge #FrontendDevelopment #WebDevelopment #JavaScript #React #Next #CodingCommunity
To view or add a comment, sign in
-
Many developers jump into building React applications without fully understanding the fundamentals. Concepts like JSX, components, props, state management, and lifecycle handling form the foundation of scalable and maintainable applications. This cheat sheet is designed to help you quickly revise and strengthen these core concepts. If you're working with React or planning to start, building a strong foundation will make everything else easier. You can explore free learning resources at CipherSchools to deepen your understanding. : https://lnkd.in/gBrTqQ9F #CipherSchools #ReactJS #FrontendDevelopment #WebDevelopment #JavaScript #SoftwareEngineering #Developers #TechCareers #Coding #FrontendDev
To view or add a comment, sign in
-
React Hooks changed the way I write React forever. 🎣 Before hooks, I was juggling class components, lifecycle methods, and `this` bindings just to manage basic state. Then `useState` and `useEffect` walked in and said "relax, we got you." 😄 A few things I love about hooks: → `useState` — dead simple state management, no class needed → `useEffect` — handle side effects cleanly in one place → `useCallback` & `useMemo` — performance wins without the headache → Custom hooks — extract and reuse logic like a pro The best part? Your components become smaller, more readable, and actually fun to write. If you're still on class components, I genuinely encourage you to make the switch. The learning curve is worth it — I promise. 🙌 What's your favourite hook? Drop it in the comments! 👇 #ReactJS #React #WebDevelopment #Frontend #JavaScript #ReactHooks #Programming #SoftwareEngineering
To view or add a comment, sign in
-
🚀 JavaScript vs TypeScript: Quick Guide for New Devs! 🚀 Confused on which to learn first? Let's simplify—no fluff! JavaScript 💨 • Super flexible, no type rules • Quick to code & prototype • Errors pop up when running • Ideal for beginners + small apps TypeScript 🛡️ • Adds types for extra safety • Spots bugs BEFORE launch • Scales perfectly for teams/big projects • Like JS but smarter! Real Diff? JS = Speedy Start | TS = Long-Term Wins Your Pick? Newbie? JS first! 📱 Pro apps? Add TS later (it's JS + types!) Master JS → Level up to TS = Unbeatable dev! 🔥 Who's your team? JS or TS? Comment below! 👇 #JavaScript #TypeScript #WebDevelopment #Frontend #CodingTips #LearnToCode #Programming #DevJourney #SoftwareDeveloper #TechTips #ReactJS #WebDev #BeginnerCoder #JavaScriptDeveloper
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