https://github.com/rakannimer/reactive-mobx-state
Micro "React-Like" reactive state management solution on top of RxJS + Mobx + Immer.
https://github.com/rakannimer/reactive-mobx-state
immer js mobx rx rxjs typescript
Last synced: 6 months ago
JSON representation
Micro "React-Like" reactive state management solution on top of RxJS + Mobx + Immer.
- Host: GitHub
- URL: https://github.com/rakannimer/reactive-mobx-state
- Owner: rakannimer
- Created: 2018-01-28T18:29:05.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-01-28T19:33:29.000Z (over 7 years ago)
- Last Synced: 2025-04-02T14:50:44.533Z (6 months ago)
- Topics: immer, js, mobx, rx, rxjs, typescript
- Language: TypeScript
- Homepage: https://rakannimer.github.io/reactive-mobx-state/index.html
- Size: 149 KB
- Stars: 3
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Reactive Mobx State
> Micro reactive state management solution on top of RxJS Mobx and Immer.
Exposes one function : [getReactiveState](https://rakannimer.github.io/reactive-mobx-state/modules/_index_.html#getreactivestate-1)
[](https://codesandbox.io/s/n741n4wrrj)
## Usage
```js
import getReactiveState from 'reactive-mobx-state'
const const {
getState,
setState,
state$,
destroy,
destroy$
} = getRxState("counter", {
tick: 0
});```
## API```javascript
import getReactiveState from 'reactive-mobx-state'
// OR
const getReactiveState = require('reactive-mobx-state').default
```## Install
This is a micro library, and as such, does very little. It provides a React like abstraction on top of the following libraries :
- [mobx](https://mobxjs.github.io)
- [mobx-utils](https://mobxjs.github.io)
- [rxjs](https://reactivex.io/rxjs/)
- [immer](https://github.com/mweststrate/immer)#### If you don't use any of these libraries in your code already
This might not be the library for you. (But check them out !)
If you want to go on anyway, install the following dependencies :
```
yarn add mobx mobx-utils rxjs immer
```Then
```
yarn add reactive-mobx-state
```
or```
npm i -S reactive-mobx-state
```## License
MIT