RxConnect
RxConnect is like Redux's @connect
, but with all the power of RxJS.
npm install --save rx-connect
Documentation
You can find the latest documentation here: http://bsideup.gitbooks.io/rxconnect/content/
Why?
Replace this:
Component { superprops; thisstate = counter: 0 ; } { thisintervalRef = ; } { ; } { return <div>thisstatecounter</div>; }
with this:
; @PureComponent { return <div>thispropsvalue</div>; }
NB: We use decorators, but it's not required. These two code blocks are completely identical:
@Component// ...and
Component// ...
Using RxJS 4?
This library supports RxJS 5 by default, but provides an adapter for RxJS 4:
;;rxConnectadapter = rx4Adapter;