import { combineReducers } from 'redux';
import {ADD_TO_CART,CHECKOUT_CART,INITIALIZATION} from '../actions/action.jsx';
import { List, Map , toJS } from 'immutable';
const products = List([]);
const initializateReducer = (state=products ,action) =>{
if(!action.products){
return state;
}
switch(action.type){
case INITIALIZATION :
for(let i=0; i< action.products.length;i++){
state.push(Map(action.products[i])); //push不进去????!!!
}
return state;
default:
return state;
}
};
慕田峪9158850
相关分类