【发布时间】:2016-06-23 15:45:47
【问题描述】:
我不想在减速器中将属性sections: [] 添加到我的对象formOpen,我从服务器收到我的对象formOpen 以及其他属性,我想添加这个,我该怎么做这里 ?
谢谢
import { combineReducers } from 'redux'
import * as types from '../constants/ActionTypes'
const initialState = {
isFetching: false,
formOpen: {
}
};
export function formEditor (state = initialState, action) {
switch (action.type) {
case types.RECEIVE_OPEN_FORM:
return {
...state,
isFetching: false,
formOpen: action.formOpen
};
default:
return state;
}
}
export default combineReducers({
formEditor
})
【问题讨论】: