Here I am trying to display the sources in my component but always i find error as state.get is not a function.
reducer.js
let initialState = Immutable.fromJS({sources: []});
export default function (state = initialState, action){
switch(action.type){
case GetSources:
return state.merge({
sources: action.sources
});
break;
}
return state;
}
Component.js
function mapStateToProps(state){
return{
sources: state.get('sources')
}
}
allReducers.js
`const allReducers = combineReducers({
sources:sources,
news:news
})`