Skip to content

Conversation

danReynolds
Copy link
Contributor

@danReynolds danReynolds commented Nov 8, 2017

Allow the start, success and fail actions for a an async action to keep track of the arguments the action was invoked with.

@danReynolds danReynolds force-pushed the feature/passArgsInAsyncAction branch from 5ef2a1a to e050ac7 Compare November 8, 2017 00:30
@coveralls
Copy link

Coverage Status

Coverage remained the same at 100.0% when pulling e050ac7 on danReynolds:feature/passArgsInAsyncAction into fd6074c on evanhobbs:master.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 100.0% when pulling e050ac7 on danReynolds:feature/passArgsInAsyncAction into fd6074c on evanhobbs:master.

@danReynolds
Copy link
Contributor Author

Coveralls man take it easy.

@evanhobbs evanhobbs self-requested a review November 8, 2017 00:59
Copy link
Owner

@evanhobbs evanhobbs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great! 👌 Just the one change of args -> actionCreatorArgs and it's good to go.

* // cause the makeRequest promise to be rejected will also get caught here as `resp`
* // and cause a failed request action.
* meta = {},
* meta: {},
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch!

return {
type: namespace,
...action,
args,
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we call this actionCreatorArgs to be a little more explicit?

// additional meta that will be passed to the action if any - must be an object
meta = {},
// arguments passed to the action when it was invoked.
args = {},
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

^^^ see above comment.

@danReynolds danReynolds force-pushed the feature/passArgsInAsyncAction branch from 67d6ac8 to b341232 Compare November 8, 2017 01:17
@coveralls
Copy link

Coverage Status

Coverage remained the same at 100.0% when pulling b341232 on danReynolds:feature/passArgsInAsyncAction into fd6074c on evanhobbs:master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants