React Redux:在哪里做繁重的工作? Reducer 还是 ActionCreator?

React Redux: Where to do heavy the heavy lifting? Reducer or ActionCreator?

之前有人问过,但我的情况不同:

我正在从服务器中提取图像,这是我在 action creator 中做的:

export function getResults(settings,page){
    return function(dispatch){
        dispatch(startGettingResults());

        return Axios.get('http://localhost:8080/getimages/',{params:{settings: settings,page:page}}).then(function(response){
            return dispatch(resultsSuccess(response.data.results, page));
        }).catch(function(){
            return dispatch(resultsFailure());
        });
    }
}

这非常简单明了:我在 action creator 中进行 API 调用,并通过我的 reducer 将所有内容存储在状态中。

但是,当用户单击我网站上的某个元素时,我希望商店中的所有当前图像都改变颜色。我将在客户端应用程序而不是服务器上进行颜色更改。

我现在的问题是,我最好在哪里完成这项繁重的工作?

我对处理这个问题的最佳方法有点迷茫。您将繁重的工作和数据操作功能放在哪里?

为什么不创建一个新的操作,例如 'COLOUR_ALL_IMAGES' 并发送它? reducer 将了解所有 te 图像的状态和 'know',无需将它们作为操作的一部分传递?