# @wiredcraft/miniprogram-sparrow

> Experimental Recoil inspired state management

Latest version **0.1.0** (published 2021-04-09) · MIT license · 0 weekly downloads

## Install

```sh
npm install @wiredcraft/miniprogram-sparrow
pnpm add @wiredcraft/miniprogram-sparrow
yarn add @wiredcraft/miniprogram-sparrow
bun add @wiredcraft/miniprogram-sparrow
```

## Health

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

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.0 |
| Published | 2021-04-09 |
| First published | 2021-03-02 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 13 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Maintainers | dowla, woodpig07, chopperlee2011, wiredcraft-bot, makara, xavierchow, wwayne, kaleocheng, flyingant, ccharlieli, illuminati1911, jakangah, ilya_wiredcraft, rankun203, superbogy, miffyliye, lalawow, bsdelf, johncalvinroberts, maxiaobao, shuaibird, juhas, cyrilselasi, christiane, xiao_t, agreatfool, haishanh |

## Links

- npm: https://www.npmjs.com/package/@wiredcraft/miniprogram-sparrow
- Repository: https://github.com/wiredcraft/miniprogram-tools
- Homepage: https://github.com/wiredcraft/miniprogram-tools#readme
- Issues: https://github.com/wiredcraft/miniprogram-tools/issues
- npm.io page: https://npm.io/package/@wiredcraft/miniprogram-sparrow

## Recent versions

- 0.1.0 (latest) — 2021-04-09
- 0.0.6-rc.0 — 2021-03-24
- 0.0.5 — 2021-03-21
- 0.0.5-rc.1 — 2021-03-09
- 0.0.4 — 2021-03-08
- 0.0.3 — 2021-03-02

## README

## Install

```bash
yarn add @wiredcraft/miniprogram-sparrow
```

## Usage

```javascript
// store/name.js

import { atom } from "sparrow";

export const firstName = atom("Jack");

// the action
export function updateFirstName(name) {
  write(firstName, name);
}
```

```javascript
// components/hello.js
import { write, behavior as sparrow } from "sparrow";
import { firstName, updateFirstName } from "./store/name";

Component({
  atoms: { firstName },

  behaviors: [sparrow],
  lifetimes: {
    attached() {
      console.log(this.firstName);
    },
  },
  methods: {
    handleButtonOnTap() {
      updateFirstName("Rose");
    },
  },
});
```

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