News for hackers. Stuff that matters.

bosmarcel

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.

Great post/reply, thanks a lot
Hahaha! Exactly
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!
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
O yes, thanks, appreciate it! I'm tired now, but i will find the time tomorrow to make it more readable!
It is based on ref. equality, so assignment through '=' will trigger an "effect".
Thanks, I really appreciate it! Hope others will feel the same. The frontend community needs and deserves simple tools:)
Thanx a lot!
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!
Hi everyone!

Thanks for the interest in fluent-state.

Just a quick note: for easy installation and trying out the demo, check out these links:

NPM: https://www.npmjs.com/package/fluent-state

Demo: https://stackblitz.com/edit/vitejs-vite-uh4kyzkf?file=src%2F...

The GitHub repo is still available here for source and issues: https://github.com/marsbos/fluent-state

Happy coding!

Show HN: Fluent-state: a new fresh take on local React state

https://github.com/marsbos/fluent-state

Hi HNI built *fluent-state*, a lightweight React hook that replaces useState, useReducer, useMemo, and useEffect.It gives you:- A fluent, proxy-based API: `state.user.name('Joe')` - Immutable updates without spread logic - Automatic dependency tracking - Built-in `compute` for reactive, memoized derived state (no useMemo needed) - Built-in `effect` for reactive side-effects with...

( Read More... | 1 comment | 2 points | on HN )