@json-lisp/web-component
v0.1.1
Published
Native custom element wrapper for the JSON LISP DOM renderer.
Downloads
250
Readme
@json-lisp/web-component
Native custom element wrapper for the JSON LISP DOM renderer.
Install
npm install @json-lisp/web-componentUsage
<json-lisp-ui></json-lisp-ui>
<script type="module">
import "@json-lisp/web-component"
const ui = document.querySelector("json-lisp-ui")
ui.document = {
v: "0.1",
state: { count: 0 },
view: ["html.button", {
"@click": ["!set", "count", ["inc", ["$get", ["$state"], "count"]]]
}, [
"Count: ",
["text", ["$get", ["$state"], "count"]]
]]
}
</script>See the full language manual:
https://github.com/Cause-of-a-Kind/json-lisp/blob/main/docs/manual.md
