Package Exports
- picodom
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (picodom) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Picodom
Picodom is a 1kb Virtual DOM builder and patch algorithm.
import { h, patch } from "picodom"
patch(
document.body,
null,
null,
h("button", {
onclick: () => alert("Hello World")
}, "Click Here")
)
Use Picodom to build your own view library and state management architecture.
import { h, patch } from "picodom"
let element, oldNode
function render(newNode) {
return (element = patch(
document.body,
element,
oldNode,
(oldNode = newNode)
))
}
function view(state) {
return (
<div>
<h1>{state}</h1>
<input
oninput={e => render(view(e.target.value))}
value={state}
type="text"
/>
</div>
)
}
render(view("Hello Picodom!"))
Documentation
The documentation is located in the /docs directory.
License
Picodom is MIT licensed. See LICENSE.