mapActions:
It just extends action's context and provides $loading property with startLoading and endLoading helpers.
It makes module's actions code cleaner and more testable.
mapDecoratedActions:
It wraps action in try/finally block.
It can significantly reduce a boilerplate code with startLoading / endLoading.
Hi, I have a proposal: add 2 action helpers -
mapActions
andmapDecoratedActions
https://gist.github.com/fxmaxvl/9353355f352561376812e90cff6a8a8b
mapActions: It just extends action's context and provides
$loading
property withstartLoading
andendLoading
helpers. It makes module's actions code cleaner and more testable.mapDecoratedActions: It wraps action in try/finally block. It can significantly reduce a boilerplate code with
startLoading
/endLoading
.