JavaScript Modules: ESM vs CommonJS - Pick a Team (or Both)!

Hey there, fellow code wranglers! Ever been knee-deep in a JavaScript project, humming along, and then BAM! You hit a file using require() and another using import, and your brain does a little “system overload” dance? Or maybe you’ve tried exporting something and wondered if it should be module.exports, exports.thing, or export default? Yeah, you’re not alone in this beautiful chaos that is JavaScript modules. It feels like a perennial “pick a team” debate: CommonJS vs. ECMAScript Modules (ESM). Let’s unwrap this present of perplexity and see if we can make sense of it all. No boxing gloves required, just a cup of your favorite beverage and maybe a few brain cells. ...

October 27, 2023 · 5 min · me

Mithril.js: The Underrated Gem That Deserves More Love

In the world of JavaScript frameworks, there’s React with its massive ecosystem, Vue with its gentle learning curve, Angular with its enterprise backing, and then… there’s Mithril.js. Quietly sitting in the corner, being fast, lightweight, and surprisingly powerful while everyone else argues about hooks vs. composition API. I’ll be honest – I stumbled upon Mithril by accident years ago while looking for a lightweight alternative to React for a small project. What I found was a framework that made me rethink what I actually need from a frontend library. Spoiler alert: it’s not 200KB of runtime and a build process that takes longer than my lunch break. ...

May 12, 2023 · 7 min · me