vdom-thunk
v3.0.0
Published
A thunk optimization for virtual-dom
Downloads
1,260
Readme
vdom-thunk
A thunk optimization for virtual-dom
Example
Use partial when you want to avoid re-rendering subtrees.
partial
will only re-evaluate the subtree if the arguments
you pass to it change. This means you should use an immutable
data structure (like observ-struct
)
var partial = require("vdom-thunk")
function render(state) {
return h('div', [
partial(header, state.head),
main(),
partial(footer, state.foot)
])
}
function header(head) { ... }
function main() { ... }
function footer(foot) { ... }
Installation
npm install vdom-thunk
Contributors
- Raynos