{"size": 401, "ext": "js", "max_stars_repo_path": "src/store/reducers/createChannel.js", "max_stars_repo_name": "FahadAlMutairi5/Chatr2.0-UI", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "src/store/reducers/createChannel.js", "max_issues_repo_name": "FahadAlMutairi5/Chatr2.0-UI", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "src/store/reducers/createChannel.js", "max_forks_repo_name": "FahadAlMutairi5/Chatr2.0-UI", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 20.05, "max_line_length": 59, "alphanum_fraction": 0.5860349127}
import * as actionTypes from "../actions/actionTypes";


const initialState ={
    channels: [],
}

const reducer = (state = initialState , action) => {
    switch(action.type){
        case actionTypes.CREATE_CHANNEL:
        return {
            ...state,
           channels: state.channels.concat(action.payload),
        };
        default:
        return state;
    }

};
export default reducer;