proppy-redux
Redux integration package for ProppyJS
Guide
Installation
With npm:
$ npm install --save proppy redux proppy-redux
Via unpkg CDN:
Usage
With the withStore
function, you can map state and dispatchable actions from Redux:
;;; // Redux reducer; // Redux action creators; { return counter: statecountervalue ;} const P = ; // we should have the Redux store set in our providersconst providers = store: ; // now we can create our instanceconst p = ; console;// {// counter: 0,// increment: Function// }
API
withStore
withStore(mapState, mapDispatch, options)
Arguments:
mapState
(Function
): Accepting Store's state, and returning mapped statemapDispatch
(Object
): Action creators keyed by their namesoptions
(Object
[optional])options.providerName
(String
): The provider name, defaults tostore