dev-resources.site
for different kinds of informations.
VanJS and a spice of DML, my Holy Graal Quest is finished...
Published at
6/4/2023
Categories
vanjs
dml
mvu
Author
artydev
Author
7 person written this
artydev
open
For many years, I have been in a search of a micro frontend UI library which would fill my needs, I can assure you that I have tried many of them...
DML was quite there, but I missed reactivity, so I created MVU which was based on DML an Morphdom.
Finally arrived the little gem VanJS and spiced by DML concepts, my Graal was finally there, a big thank to Tao and Eckehard.
I can finally dedicated my time to create and no to search anymore...
And, let us see for the last time, the famous Counter with VanJS spiced by DML.
Oh, did I said that all is under 2k JS !!!
import van from "./van.js"
const {div, h1, button } = van.tags;
const {begin, end, state} = van;
const bdiv = () => begin(div());
function Counter (start = 0) {
const counter = state(start);
let view = bdiv();
h1("Counter ", counter)
button("INC").onclick = () => ++counter.val;
end()
return view
}
const style_app = `
border:1px solid black;
padding: 10px;
background:orange`
begin(document.body)
let app = bdiv ()
h1({style:"text-align:center"}, "Demo VanJS / DML")
Counter(0)
Counter(4)
Counter(56)
end()
h1("Here is an orphan counter")
Counter(12)
app.style = style_app;
end()
mvu Article's
13 articles in total
VanJS and a spice of DML, my Holy Graal Quest is finished...
currently reading
MVU update
read article
A Color Chooser in 64 lines of JS with MVU
read article
A Very Simple Game in plain JS
read article
Create a very simple State Machine with closures
read article
Why I use MVU ?
read article
The state of MVU
read article
Morphdom and MVU, don't overlook this !
read article
Readable vs Workable Code
read article
Organizing MVU Projects
read article
Life after Elm: What we did
read article
ClojureScript MVU routing
read article
ClojureScript async MVU
read article
Featured ones: