redux-reactors
A small library (~20 loc) for creating action/reducer combinations, also known as reactors.
Quickstart
Install the library
$ npm install redux-reactors --save
Add the store enhancer
;;// ...const store = ;
Create reactors
;const incrementReactor = ;
Use reactors in your components
;; { const increment counter = props; return <div> <div>The count is counter</div> <button onClick= >Increment by one</button> <button onClick= >Increment by two</button> </div> ;} const mapStateToProps = { return counter: statecounter ;}; // Since createReactor returns an action creator,// you can use it easily with mapDispatchToPropsconst mapDispatchToProps = increment: incrementReactor; mapStateToProps mapDispatchToPropsMyComponent;