# vdom-thunk

> A thunk optimization for virtual-dom

Latest version **3.0.0** (published 2014-07-07) · 0 weekly downloads

## Install

```sh
npm install vdom-thunk
pnpm add vdom-thunk
yarn add vdom-thunk
bun add vdom-thunk
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 3.0.0 |
| Published | 2014-07-07 |
| First published | 2014-03-31 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 42 |
| Author | Raynos |
| Maintainers | raynos |

## Links

- npm: https://www.npmjs.com/package/vdom-thunk
- Repository: https://github.com/Raynos/vdom-thunk
- Issues: https://github.com/Raynos/vdom-thunk/issues
- npm.io page: https://npm.io/package/vdom-thunk

## Recent versions

- 3.0.0 (latest) — 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

## README

# vdom-thunk

<!--
    [![build status][1]][2]
    [![NPM version][3]][4]
    [![Coverage Status][5]][6]
    [![gemnasium Dependency Status][7]][8]
    [![Davis Dependency status][9]][10]
-->

<!-- [![browser support][11]][12] -->

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`)

```js
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

  [1]: https://secure.travis-ci.org/Raynos/vdom-thunk.png
  [2]: https://travis-ci.org/Raynos/vdom-thunk
  [3]: https://badge.fury.io/js/vdom-thunk.png
  [4]: https://badge.fury.io/js/vdom-thunk
  [5]: https://coveralls.io/repos/Raynos/vdom-thunk/badge.png
  [6]: https://coveralls.io/r/Raynos/vdom-thunk
  [7]: https://gemnasium.com/Raynos/vdom-thunk.png
  [8]: https://gemnasium.com/Raynos/vdom-thunk
  [9]: https://david-dm.org/Raynos/vdom-thunk.png
  [10]: https://david-dm.org/Raynos/vdom-thunk
  [11]: https://ci.testling.com/Raynos/vdom-thunk.png
  [12]: https://ci.testling.com/Raynos/vdom-thunk

---
_Source: https://npm.io/package/vdom-thunk · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
