Skip to content

Commit

Permalink
Merge pull request #1 from bamlab/feature/add-payload
Browse files Browse the repository at this point in the history
Add a payload to actions that are dispatched (start and success)
  • Loading branch information
AliceB08 authored Sep 22, 2017
2 parents 3ed1575 + 4646452 commit d2d751a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/reduxEnhancer.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,13 @@ export const enhanceActionCreators = (

return {
...reducedObject,
[`request${pascalCaseActionTitle}Start`]: () => ({
[`request${pascalCaseActionTitle}Start`]: (payload) => ({
type: actionTypes && actionTypes.REQUEST[actionTitle].START,
payload
}),
[`request${pascalCaseActionTitle}Success`]: () => ({
[`request${pascalCaseActionTitle}Success`]: (payload) => ({
type: actionTypes && actionTypes.REQUEST[actionTitle].SUCCESS,
payload
}),
[`request${pascalCaseActionTitle}Failed`]: () => ({
type: actionTypes && actionTypes.REQUEST[actionTitle].FAILED,
Expand Down

0 comments on commit d2d751a

Please sign in to comment.