@culli/dom
v0.2.0
Published
Cycle Utilities for DOM manipulation
Downloads
3
Maintainers
Readme
@culli/dom
Concise, ultra high-performance and minimalistic Virtual DOM implementation that supports true Cycle MVI pattern without need of isolation
WIP! This package is still under heavy development, use with extreme care!!
Example
import * as O from "most"
import {run} from "@cycle/most-run"
import DOM from "@culli/dom"
function main(x) {
console.log(x)
const {DOM: {h, combine}} = x
const date =
O.periodic(1000).map(() => new Date().toTimeString())
const vdom = h("div", [
h("h2", ["Clock is: ", date])
])
return {
DOM: combine(vdom)
}
}
run(main, {
DOM: DOM("#app")
})
License
MIT