# rematch-observable

> rematch-observable

Latest version **1.0.1** (published 2021-07-30) · 0 weekly downloads

## Install

```sh
npm install rematch-observable
pnpm add rematch-observable
yarn add rematch-observable
bun add rematch-observable
```

## 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.0.1 |
| Published | 2021-07-30 |
| First published | 2019-10-31 |
| Weekly downloads | 0 |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 1 |
| Unpacked size | 100.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 3 |
| Author | JW |
| Maintainers | qidanta |
| Keywords | redux, rxjs, redux-observable, rematch-observable, rematch |

## Links

- npm: https://www.npmjs.com/package/rematch-observable
- Repository: https://github.com/JiangWeixian/rematch-observable
- Homepage: https://github.com/JiangWeixian/rematch-observable#README.md
- Issues: https://github.com/JiangWeixian/rematch-observable/issues
- npm.io page: https://npm.io/package/rematch-observable

## Dependencies (1)

- [redux-observable](https://npm.io/package/redux-observable.md) ^2.0.0

## Recent versions

- 1.0.1 (latest) — 2021-07-30
- 0.1.1 — 2019-10-31
- 0.1.0 — 2019-10-31

## README

<h1>rematch-observable</h1>
<p>
  <img alt="Version" src="https://img.shields.io/github/package-json/v/jiangweixian/rematch-observable?label=rematch-observable&logo=npm" />
  <a href="#" target="_blank">
    <img alt="License: MIT" src="https://img.shields.io/badge/License-MIT-yellow.svg" />
  </a>
  <a href="https://twitter.com/jiangweixian" target="_blank">
    <img alt="Twitter: jiangweixian" src="https://img.shields.io/twitter/follow/jiangweixian.svg" />
  </a>
</p>

> redux-observable in rematch

if you looking for **rematch@1.x**, please reference to [rematch-observable@0.x](https://github.com/JiangWeixian/rematch-observable/tree/v1.x)

## Setup

```bash
npm install rematch-observable --save
```

## Usage
*see more in [example](https://github.com/JiangWeixian/rematch-observable/tree/master/example)*

```tsx
// import
import { init, RematchRootState, RematchDispatch } from '@rematch/core'

// setup plugin
const rematchObservable = createRematchObservable({ epics: { sharkEpics }, models })

export const store = init({
  models,
  plugins: [rematchObservable],
})

// types
export type Dependencies = RematchObserverDependencies<Dispatch>

// epics
import { RematchEpic, ofType } from 'rematch-observable'
import { mapTo } from 'rxjs/operators'
import { RootState, Dependencies } from 'src/store'

export const sharkEpics: RematchEpic<RootState, Dependencies> = (
  action$,
  state$,
  { dispatchers },
) => {
  return action$.pipe(
    ofType(dispatchers.dolphins.increment, dispatchers.dolphins.incrementAsync),
    mapTo(dispatchers.sharks.increment(1)),
  )
}
```

## Author

👤 **JiangWeixian**

* Twitter: [@jiangweixian](https://twitter.com/jiangweixian)
* Github: [@jiangweixian](https://github.com/jiangweixian)

## Show your support

Give a ⭐️ if this project helped you!

<a href="https://www.patreon.com/jiangweixian">
  <img src="https://c5.patreon.com/external/logo/become_a_patron_button@2x.png" width="160">
</a>

***
_This README was generated with ❤️ by [readme-md-generator](https://github.com/kefranabg/readme-md-generator)_

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