{"size": 542, "ext": "js", "max_stars_repo_path": "messageboard/src/store/reducers/discussionReducer.js", "max_stars_repo_name": "jkdearnley/Messageboard-ReactReduxFirbase", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "messageboard/src/store/reducers/discussionReducer.js", "max_issues_repo_name": "jkdearnley/Messageboard-ReactReduxFirbase", "max_issues_repo_issues_event_min_datetime": "2021-03-10T12:26:40.000Z", "max_issues_repo_issues_event_max_datetime": "2022-02-26T20:43:33.000Z", "max_forks_repo_path": "messageboard/src/store/reducers/discussionReducer.js", "max_forks_repo_name": "jkdearnley/Messageboard-ReactReduxFirbase", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": 5, "max_forks_count": null, "avg_line_length": 30.1111111111, "max_line_length": 64, "alphanum_fraction": 0.5830258303}
const initState = {
    discussions: [
        {id: '1', title: 'Test 1', content: 'blah blah blah'},
        {id: '2', title: 'Test 2', content: 'blah blah blah'},
        {id: '3', title: 'Test 3', content: 'blah blah blah'},
        {id: '4', title: 'Test 4', content: 'blah blah blah'}
    ]
}

const discussionReducer = (state = initState, action) => {
    switch (action.type) {
        case 'CREATE_DISCUSSION':
            console.log('created discussion', action.discussion)
    }
    return state
}

export default discussionReducer