郎朗坤
先来看看redux-immutable上的解释Using combineReducers it is possible to provide createStore with initial state using Immutable Iterable type, i.e:import { createStore } from 'redux';import { combineReducers } from 'redux-immutablejs';import Immutable from 'immutable';import * as reducers from './reducers';const reducer = combineReducers(reducers);const state = Immutable.fromJS({});const store = reducer(state);export default createStore(reducer, store);上面这段代码讲的是redux-immutablejs'提供了combineReducers的功能,那么redux本身就有combineReducers的方法可以使用,为什么还需要一个redux-immutable呢?在我看来,这个插件多余了,原作者可能是想将redux的combineReducers功能提取出来作为一个单独的中间件使用,但是redux开发者最痛恨的是什么?性能!开发一个简单的网站都需要一大堆插件,网站体积变的很庞大,拜托。。千万别再搞那么多中间件了。