3.0.0 • Published 10 years ago

vdom-thunk v3.0.0

Weekly downloads
237
License
-
Repository
github
Last release
10 years ago

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

MIT Licenced

3.0.0

10 years ago

2.0.1

10 years ago

2.0.0

10 years ago

1.7.2

10 years ago

1.7.1

10 years ago

1.7.0

10 years ago

1.6.0

10 years ago

1.5.2

10 years ago

1.5.1

10 years ago

1.5.0

10 years ago

1.4.0

10 years ago

1.3.0

10 years ago

1.2.0

10 years ago

1.1.0

10 years ago

1.0.0

10 years ago