This repository was archived by the owner on Dec 18, 2024. It is now read-only.
- Notifications
You must be signed in to change notification settings - Fork12
This repository was archived by the owner on Dec 18, 2024. It is now read-only.
Handler map factory should handle optimistic action type #4
Open
Description
According to#2,createHandlerMap should be capable to handle optimistic action creators.
Detailed Description
Yet, optimistic actions should be handled separately with multiplecreateHandlerMap call. So there would be a good point to reduce boilerplates.
Although, cancel is not part ofobserver protocol but this type practically is important and should be handled in many cases (isFetching entity, etc.) in the reducers.
Possible Implementation
createHandlerMap(addFoo,{next(state,action){},error(state,action){},complete(state,action){},cancel(state,action){}})