-
Notifications
You must be signed in to change notification settings - Fork 4
keep track of the arguments passed to the action #3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
keep track of the arguments passed to the action #3
Conversation
5ef2a1a
to
e050ac7
Compare
Coveralls man take it easy. |
There was a problem hiding this 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: {}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch!
src/async-action.js
Outdated
return { | ||
type: namespace, | ||
...action, | ||
args, |
There was a problem hiding this comment.
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?
src/middleware.js
Outdated
// 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 = {}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
^^^ see above comment.
67d6ac8
to
b341232
Compare
Allow the start, success and fail actions for a an async action to keep track of the arguments the action was invoked with.