README
snabbdom-render
A rendering loop for snabbdom.
Installation
npm install snabbdom-render
Usage
import snabbdom from 'snabbdom'
import h from 'snabbdom/h'
import render from 'snabbdom-render'
const patch = snabbdom.init([])
const tree = () => h('p', new Date().toISOString())
const root = document.getElementById('root')
const update = render(patch, tree, root)
setInterval(update, 3000)
For an example built with Redux, see examples/counter.
API
update = render(patch, tree, root)
Use patch
to render the given tree
on the root
node.