Most grouping bugs I debug in production come from assuming keys are always strings. Object.groupBy() is fine for primitive keys, but anything else gets coerced into a property name. That means object/function keys collapse into "[object Object]", and you lose identity. Map.groupBy() keeps keys by reference, so lookups and merges remain predictable across code paths (assuming your runtime supports it, or you polyfill it). Where in your codebase are you grouping by something that isn’t naturally a string? #javascript #typescript #frontend #webdev
Jake O.’s Post
More Relevant Posts
-
Went back to core concepts like components, props, state, hooks, and component lifecycle to strengthen my fundamentals. Revisiting the basics always helps uncover better patterns, cleaner code, and improved performance. It’s a good reminder that strong foundations are key to building scalable and maintainable applications. #ReactJS #FrontendDevelopment #WebDevelopment #JavaScript #LearningJourney #Revision
To view or add a comment, sign in
-
Ever looked at your frontend code and thought — “It works… but something feels wrong.” That “feels wrong” is often a code smell 🦨 In my latest Medium article, I break down: • What code smells really are (not bugs, but warnings) • Common frontend code smells I’ve seen in real projects • Why ignoring them leads to bugs & tech debt • Practical JavaScript / TypeScript examples Clean code isn’t about perfection — it’s about making code easy to read, change, and trust. 👉 Read the article here: [https://lnkd.in/gXyieZBG] #Frontend #JavaScript #TypeScript #CleanCode #CodeSmells #WebDevelopment
To view or add a comment, sign in
-
-
Bad Code vs Good Code 🚫Issues: ❌ No error handling ❌ Nested .then() reduces readability ❌ Unclear parameter naming ❌ No response validation 🔥 Why this is better: ✅ async/await improves readability ✅ Proper error handling ✅ Clear naming (userId) ✅ Easier to test & maintain Clean async code = fewer production bugs. ❤️ Like | 💬 Comment | 🔁 Repost #JavaScript #AsyncAwait #CleanCode #MERNStack #Frontend #Backend #WebDevelopment #Coding
To view or add a comment, sign in
-
-
Today I learned about Debouncing and Throttling — two simple but powerful techniques to improve performance in frontend applications. Debouncing ensures a function runs only after the user stops triggering an event (great for search inputs). Throttling limits how often a function can run within a fixed time interval (useful for scroll or resize events). These techniques help reduce unnecessary API calls and make applications smoother and more efficient. Small concepts, big impact 🚀 #JavaScript #WebDevelopment #Frontend #Performance #Learning
To view or add a comment, sign in
-
🔹JavaScript Tip: bind vs call vs apply These three methods are often confusing, but they all exist for one main reason: controlling the value of this when calling a function. Here’s a simple breakdown 👇 ✅ call() Invokes the function immediately Arguments are passed one by one ✅ apply() Invokes the function immediately Arguments are passed as an array ✅ bind() Does not invoke the function Returns a new function with this (and optional arguments) permanently bound Perfect for callbacks and event handlers Understanding these three makes working with callbacks, event listeners, and frameworks much easier. #JavaScript #WebDevelopment #Frontend #ProgrammingTips #CleanCode
To view or add a comment, sign in
-
-
A callback function is a function that is passed as an argument to another function and executed after a task is completed. Callbacks are the backbone of asynchronous JavaScript. They help handle tasks like: ⏱️ Timers (setTimeout) 🌐 API calls 🖱️ Event handling Without callbacks, JavaScript would block execution and slow everything down. ⚠️ Too many nested callbacks can lead to callback hell, which is why we later use Promises and Async/Await. Understanding callbacks = understanding how JavaScript really works 🚀 Nishant Pal #JavaScript #WebDevelopment #Frontend #AsyncJS #Coding #LearnJavaScript
To view or add a comment, sign in
-
-
I recently came across a project that relied heavily on barrel files to keep imports clean. It looked neat at first, but we started noticing slower page loads and tricky circular dependency issues. Barrel files are convenient, but overusing them can hurt performance and maintainability. Great tool , just don’t overuse it. #JavaScript #TypeScript #Frontend #WebPerformance
To view or add a comment, sign in
-
-
Most JavaScript bugs don’t come from logic. They come from misunderstanding null vs undefined. In TypeScript, these two are not interchangeable 👇 ◾undefined → value was never assigned ◾null → value was intentionally set to “nothing” Why this matters: strict mode will block unsafe assumptions APIs become more predictable state management gets cleaner fewer “works on my machine” moments If you’re serious about writing scalable TypeScript, this difference is a must-know. 💾 Save this 💬 Share with a dev who still mixes them up #TypeScript #JavaScript #WebDev #CleanCode #Frontend #Backend #LearningInPublic #DevCommunity
To view or add a comment, sign in
-
-
🚨 Quick JavaScript challenge Looks like a simple object method accessing this.name. Nothing fancy. Should work… right? But the output is not what most people expect. Before running it - Ask yourself: 👉 Does an object create scope? 👉 Where does this really come from? 👉 Arrow vs normal function - who controls it? Guess the output 👇 #JavaScript #Frontend #CodingChallenge
To view or add a comment, sign in
-
-
⚛️ React: Class Components vs Functional Components with Hooks Class Components • 🧱 Use class syntax • 🔄 State & side effects via lifecycle methods • 🧩 Logic scattered, verbose code • ⚠️ Harder to reuse and test Functional Components with Hooks • 🧠 Use functions • 🪝 State & effects via Hooks (useState, useEffect, useContext) • ♻️ Logic reusable and composable • ✨ Cleaner, maintainable, scalable. Hooks simplify React development, centralize logic, improve reuse, and reduce boilerplate—making functional components the modern standard. #ReactJS #WebDevelopment #FrontendDevelopment #JavaScript #ReactHooks #FunctionalComponents #SoftwareEngineering #CleanCode #WebDev #CodeQuality
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