Rather than requiring each action to declare a single :edit function and (optionally) a single :when predicate to determine whether the action can be performed on a given app-state, it should be possible to call the action function multiple times with the same name but different :edit/:when pairs.
Each pair will be stored under the same action name; when the action is triggered, each predicate will be invoked on the application state in order of registration, and the first predicate to return truthy will cause its corresponding :edit function to be invoked.
This should allow for greater separation of concerns between unrelated branches of the same action.
Rather than requiring each action to declare a single
:edit
function and (optionally) a single:when
predicate to determine whether the action can be performed on a given app-state, it should be possible to call theaction
function multiple times with the same name but different:edit
/:when
pairs.Each pair will be stored under the same action name; when the action is triggered, each predicate will be invoked on the application state in order of registration, and the first predicate to return truthy will cause its corresponding
:edit
function to be invoked.This should allow for greater separation of concerns between unrelated branches of the same action.