v2.1.0
- Adds
withExtraArgument
for the cases when you want to inject a custom argument into all thunks. (#70)
const store = createStore(
reducer,
applyMiddleware(thunk.withExtraArgument(api))
)
// later
function fetchUser(id) {
return (dispatch, getState, api) => {
// you can use api here
}
}