import { combineReducers } from 'redux';
import games from './r_games.js';
import picks from './r_picks.js';
import teams from './r_teams.js';

const appReducer = combineReducers({
    games,
    picks,
    teams
});

const rootReducer = (state, action) => {
    // set new state
    const updatedState = state;

    // pass new state
    return appReducer(updatedState, action);
};

export default rootReducer;
