Stop installing NPM packages for everything. The browser can already do it. We've all been there: you need to add a "share" button, deep-clone an object, or format a date. The first instinct? Head to NPM, find a library, and install it. But every time we rely on a third-party package for a simple task, we pay a hidden tax: ❌ Increased bundle size ❌ Slower load times for our users ❌ More dependencies to update and maintain ❌ Potential security vulnerabilities Modern browsers are incredibly powerful, and we often ignore the amazing Native Web APIs right at our fingertips. Take the Web Share API navigator.share(), for example. Instead of importing a bulky custom social sharing component, you can use a few lines of vanilla JavaScript to trigger the native sharing dialog on a user's device. 🎯 Zero bundle size added. 🎯 Familiar native UI for the user. 🎯 No third-party code to maintain. And it doesn't stop at sharing! Before you reach for a library, check if the browser already has your back: ✔️ Need scroll-based animations or lazy loading? Use Intersection Observer instead of heavy scroll-event listeners. ✔️Need to format dates, times, or currencies? Use the Intl API instead of massive date-handling libraries. ✔️Need to deep copy an object? Use structuredClone() instead of installing a utility library. Let's start leaning on the platform. By utilizing built-in Web APIs, we write cleaner code, ship less JavaScript, and build significantly faster applications. Hi, i'm Emmanuel joel, a self-taught frontend engineer who loves talking about his struggles. If this is your first time seeing my post, i want to connect with you. Let's be friends. What is your favorite native Web API that saves you from installing an extra package? Let me know below! 👇 #WebDevelopment #JavaScript #WebPerformance #Frontend #SoftwareEngineering #CodingTips
Thanks for reposting Omokhomion Ehis Stanley
Great insight Emmanuel! These are the exact mistakes I stopped making when I reached mid-level. Before installing any library now, I always ask myself: - Can I get this done faster with vanilla JS? - How's the developer experience for this library? - What's the bundle size impact? - Who maintains it and how actively? - Does it actually get the job done after install? The last point is underrated some packages look great on NPM but fail the moment you actually use them in a real project.
Can we use in offline environment
Yes you can