# @jsar/mobx-saga

> A bridge between Redux-Saga and MobX

Latest version **0.1.0** (published 2022-01-22) · MIT license · 0 weekly downloads

## Install

```sh
npm install @jsar/mobx-saga
pnpm add @jsar/mobx-saga
yarn add @jsar/mobx-saga
bun add @jsar/mobx-saga
```

## 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 | 2022-01-22 |
| First published | 2022-01-22 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 3 |
| Unpacked size | 25.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | johan ar |
| Maintainers | johan-ar |

## Links

- npm: https://www.npmjs.com/package/@jsar/mobx-saga
- Repository: https://github.com/johan-ar/mobx-saga
- Homepage: https://github.com/johan-ar/mobx-saga#readme
- Issues: https://github.com/johan-ar/mobx-saga/issues
- npm.io page: https://npm.io/package/@jsar/mobx-saga

## Dependencies (3)

- [mobx](https://npm.io/package/mobx.md) ^6.3.12
- [redux-saga](https://npm.io/package/redux-saga.md) ^1.1.3
- [@redux-saga/core](https://npm.io/package/@redux-saga/core.md) ^1.1.3

## Recent versions

- 0.1.0 (latest) — 2022-01-22

## README

# MobX Saga

A bridge between Redux-Saga and MobX

```
$ npm install @jsar/mobx-saga
```

## Getting Started

```ts
import { createMobXSaga } from '@jsar/mobx-saga'
import rootStore from './rootStore'

const saga = createMobXSaga({
  store: rootStore
})

saga.run(function *rootSaga() {
  ...
})

// Action Dispatcher
saga.dispatch(myAction)


```

## **`commit`** Effect

```ts
import { commit, type Mutation } from "@jsar/mobx-saga";
import type { RootStore } from "./rootStore";

type RootStore = { value: number };

const increment: Mutation<RootStore, [number]> = (store, inc) => {
  store.value += inc;
};

function* incSaga() {
  yield commit(increment, 1);
}
```

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