with-middleware
Add middleware support to any function prop or withState from recompose
About
with-middleware
provides the ability to add middleware support (and reducers)
to function props of a component.
The middleware API follows closely to that of redux
, giving you the ability
to quickly re-use some of the middlewares that were written for redux within a
single component.
This library goes well with the usage of the withState
higher-order component
from recompose
. Changes will be required if you're using withReducer
from recompose
.
Installation
Install the library via:
npm install with-middleware --save
Examples
Sample Usage
;;;; const enhance = ; const Counter = ; ;
Function Reference
withMiddleware
; : HigherOrderComponent
useReducer
; : Middleware
useDevtools
; : Middleware
License
with-middleware
is MIT licensed