vdom-thunk

A thunk optimization for virtual-dom

15 个版本
安装
npm install vdom-thunk
yarn add vdom-thunk
pnpm add vdom-thunk
bun add vdom-thunk
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

MIT Licenced

版本列表
3.0.0 2014-07-07
2.0.1 2014-06-02
2.0.0 2014-04-25
1.7.2 2014-04-18
1.7.1 2014-04-18
1.7.0 2014-04-18
1.6.0 2014-04-18
1.5.2 2014-04-18
1.5.1 2014-04-18
1.5.0 2014-04-18
1.4.0 2014-04-17
1.3.0 2014-04-16
1.2.0 2014-04-11
1.1.0 2014-03-31
1.0.0 2014-03-31