# wrist

> Easy way to bind or react to properties change.

Latest version **0.0.3** (published 2017-02-11) · MIT license · 0 weekly downloads

## Install

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

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.3 |
| Published | 2017-02-11 |
| First published | 2017-02-03 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 52 |
| Author | Andrea Giammarchi |
| Maintainers | webreflection |
| Keywords | observer, mutation, watch, unwatch, react, properties, changes |

## Links

- npm: https://www.npmjs.com/package/wrist
- Repository: https://github.com/WebReflection/wrist
- Homepage: https://github.com/WebReflection/wrist#readme
- Issues: https://github.com/WebReflection/wrist/issues
- npm.io page: https://npm.io/package/wrist

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 0.0.3 (latest) — 2017-02-11
- 0.0.2 — 2017-02-10
- 0.0.1 — 2017-02-03

## README

# wrist [![Build Status](https://travis-ci.org/WebReflection/wrist.svg?branch=master)](https://travis-ci.org/WebReflection/wrist) [![Coverage Status](https://coveralls.io/repos/github/WebReflection/wrist/badge.svg?branch=master)](https://coveralls.io/github/WebReflection/wrist?branch=master)


An easy way to bind or react to properties change.

It also works with `input` elements and their `value` too.

```js
const watcher = wrist.watch(
  // generic Object or DOM element
  generic,
  // the property name to watch
  'propertyName',
  // the callback that will trigger
  // only when property value changes
  function cb(propName, oldVal, newVal) {
    this === generic; // true
    propName;         // "propertyName"
  }
);

// to drop a watcher
watcher.unwatch();

// or via unwatch and same watch signature
wrist.unwatch(generic, 'propName', cb);
```

Each property can have more than one callback registered.

Dual bindings do not interfere with each other.

- - -

(C) 2017 Andrea Giammarchi - MIT Style License

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