0.0.3 • Published 4 years ago

dnjs2dom v0.0.3

Weekly downloads
1
License
MIT
Repository
github
Last release
4 years ago

dnjs client helper

For when you don't need all of mithril (this is currently 33 lines).

Usage:

<ul id="comments"></ul>

<script type="module">
    import m from "https://unpkg.com/dnjs2dom@0.0.2/index.js"

    const commentsEl = document.getElementById("comments")
    const comments = [{text: "hiya!"}, {text: "oioi"}]
    const ul = m("ul#foo.bar",
        comments.map((comment, i) => m("li", `Comment ${i} says: ${comment.text}`))
    )
    m.setInner(commentsEl, m.makeEl(ul))
</script>
0.0.3

4 years ago

0.0.2

4 years ago

0.0.1

4 years ago