Make DOM Reactive. Nothing more.
Mador:
is a very small reactive DOM runtime.
is for people who don't need or want a framework.
It gives you reactive state and a way to bind that state to existing DOM.
Mador is a native ES module and can be used through npm or directly from a CDN.
import mador from "https://cdn.jsdelivr.net/npm/@marsbos/mador@latest/dist/mador.js" ; const [ read , write ] = mador ( { count : 1 , } ) ; read ( ".counter" , ( el , count ) => { el . textContent = `Count: ${ count } ` ; } , ( state ) => state . count , ) ; read ( ".another-counter" , ( el , count ) => { el . textContent = count * 3 ; } , ( state ) => state . count , ) ; write ( ( state ) => { state . count ++ ; } ) ;
And that's basically all.
There are no components, templates or virtual DOM. Mador works with the DOM you already have.
Reactive bindings
... continue reading