{"size": 725, "ext": "js", "max_stars_repo_path": "src/redux/formReducer.js", "max_stars_repo_name": "cablegunmaster/Simple-Redux-Boilerplate", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "src/redux/formReducer.js", "max_issues_repo_name": "cablegunmaster/Simple-Redux-Boilerplate", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "src/redux/formReducer.js", "max_forks_repo_name": "cablegunmaster/Simple-Redux-Boilerplate", "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": 19.0789473684, "max_line_length": 57, "alphanum_fraction": 0.5627586207}
/**
 * React Native App
 * https://github.com/srlopez/rntest
 *
 */

'use strict'
//import { combineReducers } from 'redux'
import { actionsTypes as types } from './formActions'


//Redux Initial State
let initialState = {
    values: {
        formName: 'myTest'
    }
};

function formReducer(state = initialState, action) {
    switch (action.type) {

        case types.FORM_UPDATE_VALUE:
            return Object.assign({}, state, {
                values: Object.assign({}, state.values, {
                    [action.name]: action.value
                })
            });

        case types.FORM_RESET:
            return initialState;

        default:
            return state
    }
}

export default formReducer;
