virtual-raf
Create a RAF
loop for
virtual-dom
.
Installation
$ npm install virtual-raf
Usage
const vraf = const vdom = const h = { return } const tree = documentbody tree
API
tree = vraf(state, render, vdom)
Create a virtual-dom
tree based on a state
and render function.
tree.render()
Mount the virtual-dom
tree on a DOM node.
tree.update(state, [render])
Update the tree with an optional new state and render function.
See Also
- main-loop - A rendering loop for diffable UIs
- render-loop - Async DOM render loop with virtual dom diffing and Hyperglue