Rxact Rxjs
Rxact Rxjs is a Rxact plugin for improving RxJS supporting to Rxact.
NOTE: Rxact support RxJS natively, this plugin is optional.
What does this plugin do:
- Make calling state stream's operator just like RxJS operator.
Installation
yarn add rxact rxact-rxjs
Usage
There are two ways:
1. Install as a plugin
const stream = 'stream' name: 'rxact' // define an operator stream { console } // you can access operator on Rx.Observable.prototype as 'stream$operator' streamstate$
2. Enhance StateStream
const EnhancedStateStream = StateStream const stream = 'stream' name: 'rxact' stream { console } streamstate$
This plugin help you map state stream's opertors to RxJS operators.
The name mapped in the form [streamName]$[operatorName]
, such as:
user$login
, note$add
.
API
plugin()
return a StateStream plugin.
decorator()
return a function for wrapping StateStream.