Recent submissions

Comment · 1 month ago
Looks nice!

Imho, custom elements are great, but very limited in a way that they almost always require knowledge of the domain.

Perhaps I can figure out a way to combine mador.js & custom elements.

Comment · 1 month ago
Great post/reply, thanks a lot
Comment · 1 month ago
Hahaha! Exactly
Comment · 1 month ago
That's a fair distinction, but I think they solve different problems. Signals are great, but they usually require managing primitives individually and don't map directly to deep, nested JS objects the same way. Mador is specifically about dropping in a plain, nested object and working with it like normal JS without .value "boilerplate". Appreciate the feedback on the README phrasing though—I'll tweak it so it doesn't sound like a false dilemma!
Comment · 1 month ago
Honestly, mostly for the fun of building it and seeing how small and simple I could make it. While big solutions like Preact or Vue are great, sometimes you just want a tiny zero-dependency script without the overhead. And it turned out to be quite nice as I may say so
Comment · 1 month ago
O yes, thanks, appreciate it! I'm tired now, but i will find the time tomorrow to make it more readable!
Comment · 1 month ago
It is based on ref. equality, so assignment through '=' will trigger an "effect".
Comment · 1 month ago
Thanks, I really appreciate it! Hope others will feel the same. The frontend community needs and deserves simple tools:)
Comment · 1 month ago
Thanx a lot!
Comment · 1 month ago
Hey HN! I wanted to see how far you can push modern JavaScript Proxies without all the heavy overhead of a traditional framework. The result is Mador: a tiny ~80-line reactive state tuple ([r, w]) that lets you make any DOM element reactive using a simple CSS selector, automated dependency tracking, and batched microtasks. No build steps required—just drop it in. I built this over the weekend just to experiment with clean, zero-dependency reactivity. Would love to hear your thoughts or see where you'd run into limits with something like this!

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton