Open marcindz88 opened 3 months ago
The solution could include moving the updateState logic into the on function, resulting in code:
on(actions. updateSomeEntity, ({ entity }) => addEntity(entity, ENTITY_COLLECTION));
@marcindz88, I've updated the docs and added updateState
. I agree that your version of the on
function is something we should add but I think, it will be available in the new version of the redux where we decouple actions from the store.
Hi I would love to see a feature where we can define updateState with redux on functions more easily without repeating action name twice. Current code to include action name in redux dev tools looks like this:
I tried to create a wrapper that will accept on with some configuration, but failed because some internal types are not exported.
Also I have not seen anything the docs about
updateState
so it's worth including I think, as I found it by accident.