# reapex-plugin-local-storage

> Persist application state to localStorage

Latest version **1.1.1** (published 2022-07-04) · MIT license · 0 weekly downloads

## Install

```sh
npm install reapex-plugin-local-storage
pnpm add reapex-plugin-local-storage
yarn add reapex-plugin-local-storage
bun add reapex-plugin-local-storage
```

## Health

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

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

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.1 |
| Published | 2022-07-04 |
| First published | 2021-10-28 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 69.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 57 |
| Author | Yulong Ruan |
| Maintainers | ruanyu1 |
| Keywords | reapex, redux, localStorage |

## Links

- npm: https://www.npmjs.com/package/reapex-plugin-local-storage
- Repository: https://github.com/ruanyl/reapex
- Homepage: https://github.com/ruanyl/reapex/blob/master/packages/reapex-plugin-local-storage/README.md
- Issues: https://github.com/ruanyl/reapex/issues
- npm.io page: https://npm.io/package/reapex-plugin-local-storage

## Alternatives

- [localforage](https://npm.io/package/localforage.md) — 6.2M weekly downloads
- [localforage-observable](https://npm.io/package/localforage-observable.md) — 30.8K weekly downloads
- [@y/y](https://npm.io/package/@y/y.md) — 30.1K weekly downloads
- [@metaobjectsdev/render](https://npm.io/package/@metaobjectsdev/render.md) — 3.5K weekly downloads
- [@ledgerhq/coin-algorand](https://npm.io/package/@ledgerhq/coin-algorand.md) — 1.1K weekly downloads

## Recent versions

- 1.1.1 (latest) — 2022-07-04
- 1.0.0 — 2022-03-16
- 1.0.0-beta.28 — 2022-01-16
- 1.0.0-beta.27 — 2022-01-16
- 1.0.0-beta.26 — 2021-10-28

## README

### Reapex local storage plugin
Easily persist and restore data between state and local storage

![image](https://user-images.githubusercontent.com/486382/139324424-924a3b72-c30a-4a30-9adf-0308420159c5.gif)


```typescript
import { App } from 'reapex'
import createLocalStoragePlugin from 'reapex-plugin-local-storage'

// 1. Initialize the plugin
const { plugin, persist } = createLocalStoragePlugin()
const app = new App()

// 2. register the plugin
app.plugin(plugin)

// 3. Simply wrap a `model` with `persist`
const UserModel = app.model('User', { name: '', age: 0 })
persist(UserModel)

```

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