-
Notifications
You must be signed in to change notification settings - Fork 295
Use action function as handleAction(s) type param #51
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
Use action function as handleAction(s) type param #51
Conversation
src/createAction.js
Outdated
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.
IMHO, it should be const instead of let.
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.
Yup, please use const here.
|
Currently duplicated with #32, but when the author does not answer there, we can go with this PR. Are you fine with that? |
|
Yes, I'm ok with that. I just want to have this feature merged through this PR or #32, it doesn't matter. |
|
Looks like the author of #32 doesn't care anymore of his PR, so we'll go with this one. |
|
Can you also provide some tests please? |
|
@timche I've added 2 tests and replaced |
|
@nikita-graf Thanks, but |
|
Didn't see that, for now it's up to date:smile: |
|
Thanks @nikita-graf, merged :) |
|
Great, thanks :) |
This PR allows to use actions as type parameter for
handleActionandhandleActionslike so:It prevents from copy&paste action names across modules, allows to use autocomplete in IDE.