-
Notifications
You must be signed in to change notification settings - Fork 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
I have a few suggestions #105
Comments
Hi @anion155! Thanks a lot for you for taking the time for making these suggestions. 🙂
Good idea! I was already considering that, but just didn't get around to it yet. Out of curiosity, are there any particular use cases you have for action metadata and/or the
I'm interested in learning more about how you use this. Do you have some examples where this helper was useful for you? |
Not yet, sometimes it can used, but for me it was two or three this kind of actions, and in all my cases it's all was handled by middleware, 'cause I don't really like to store object like error or some mythic-non-typed meta information in store. But FSA is kind of standart already, and some people may found some good use for this. |
For the store => next => action => {
// do staff
return next(action);
} Similar store => next => action => {
const result = next(action);
// do staff
return result;
} For the store => next => action =. {
switch (action.type) {
case 'SOME_AWESOME_ACTION_TYPE':
// do staff
return next(action);
}
} Helper just creates map of handlers, and |
Hi, @denisw ! First of all, great lib!
I have a couple suggestions. Just wanted to know if you are interesting in any of them )).
Add payload creator option to
createAction#withPayload
, for custom arguments in generated action creator. Also maybe add helpers likewithMeta
,error
for FSA compabillity.Create some form of middleware generator, with ho-functions mapped to corresponding action type. In my projects I'm using this construction:
The text was updated successfully, but these errors were encountered: