# xoo

> black magic state management for dom components

Latest version **3.0.1** (published 2020-03-31) · MIT license · 0 weekly downloads

## Install

```sh
npm install xoo
pnpm add xoo
yarn add xoo
bun add xoo
```

## 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.1 |
| Published | 2020-03-31 |
| First published | 2016-09-10 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 6.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Luke Burns |
| Maintainers | lukeburns |

## Links

- npm: https://www.npmjs.com/package/xoo
- npm.io page: https://npm.io/package/xoo

## Dependencies (1)

- [morphable](https://npm.io/package/morphable.md) ^0.7.5

## Recent versions

- 3.0.1 (latest) — 2020-03-31
- 3.0.0 — 2020-03-30
- 2.0.4 — 2020-01-06
- 2.0.3 — 2020-01-06
- 2.0.2 — 2020-01-06
- 2.0.1 — 2020-01-06
- 2.0.0 — 2019-12-21
- 1.2.3 — 2018-09-12
- 1.2.2 — 2018-09-12
- 1.2.1 — 2018-03-19
- 1.2.0 — 2018-03-16
- 1.1.3 — 2018-03-14
- 1.1.2 — 2018-03-13
- 1.1.1 — 2018-03-13
- 1.1.0 — 2018-03-12
- … 3 more at https://npm.io/package/xoo/versions

## README

# xoo

black magic state management for dom components

```js
npm install xoo
```

the goal of xoo is to make reactive component state management easy peasy with black magic (i.e. proxies) for rapid prototyping. anytime you change your state, your components will update sparsely if they depend on your state. xoo bind `this` to your Component's methods so you don't have to and provides a functional interface for rendering Component instances.

xoo is built on [morphable](https://github.com/lukeburns/morphable)

## example

```js
const { Component } = require('xoo')
const html = require('nanohtml')

class Body extends Component {
  constructor () {
    super()
    this.count = 0
  }
  increment () {
    this.count++
  }
  render () {
    return html`<body>
      <h1>count is ${this.count}</h1>
      <button onclick=${this.increment}>increment</button>
    </body>`
  }
}

const body = new Body()
document.body = body() // alias for body.render()
```

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