# remos-immer

> An Immer wrapper for Remos

Latest version **0.3.0** (published 2022-04-16) · ISC license · 0 weekly downloads

## Install

```sh
npm install remos-immer
pnpm add remos-immer
yarn add remos-immer
bun add remos-immer
```

## Health

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

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

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.3.0 |
| Published | 2022-04-16 |
| First published | 2022-04-06 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 6.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | linq2js |
| Maintainers | linq2js |
| Keywords | redux, oop, model, state, state management, react, immer |

## Links

- npm: https://www.npmjs.com/package/remos-immer
- Repository: https://github.com/linq2js/remos
- Homepage: https://linq2js.github.io/remos/
- Issues: https://github.com/linq2js/remos/issues
- npm.io page: https://npm.io/package/remos-immer

## 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.3.0 (latest) — 2022-04-16
- 0.2.1 — 2022-04-13
- 0.2.0 — 2022-04-13
- 0.1.23 — 2022-04-12
- 0.1.17 — 2022-04-11
- 0.1.3 — 2022-04-10
- 0.1.0 — 2022-04-09
- 0.0.18 — 2022-04-09
- 0.0.17 — 2022-04-08
- 0.0.16 — 2022-04-08
- 0.0.15 — 2022-04-08
- 0.0.14 — 2022-04-08
- 0.0.13 — 2022-04-07
- 0.0.12 — 2022-04-07
- 0.0.11 — 2022-04-07
- … 5 more at https://npm.io/package/remos-immer/versions

## README

# remos-immer

An Immer wrapper for Remos

## Installation

**NPM**

```bash
npm i remos-immer --save
```

**YARN**

```bash
yarn add remos-immer
```

## Usages

With remos-immer

```js
import { create, inject } from "remos";
import { withImmer } from "remos-immer";

inject(withImmer());

const todoModel = create({
  todos: [],
  add(todo) {
    this.todos.push(todo);
  },
  remove(id) {
    const index = this.todos.findIndex((x) => x.id === id);
    this.todos.splice(index, 1);
  },
});
```

Without remos-immer

```js
import { create, configure } from "remos";

const todoModel = create({
  todos: [],
  add(todo) {
    this.todos = [...this.todos, todo];
  },
  remove(id) {
    const index = this.todos.findIndex((x) => x.id === id);
    this.todos = [
      ...this.todos.slice(0, index),
      ...this.todos.slice(index + 1),
    ];
  },
});
```

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