{"size": 549, "ext": "js", "max_stars_repo_path": "src/reducers/todos.js", "max_stars_repo_name": "idolice/react-to-do-list-demo", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "src/reducers/todos.js", "max_issues_repo_name": "idolice/react-to-do-list-demo", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "src/reducers/todos.js", "max_forks_repo_name": "idolice/react-to-do-list-demo", "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": 27.45, "max_line_length": 98, "alphanum_fraction": 0.7030965392}

import { handleActions } from 'redux-actions'
import {FETCH_DATA, RECEIVE_DATA} from '../actions/todos'
var videolist = [];
var video = {};
video.description= "test"
video.url = "test"
video.picUrl = "test"
videolist.push(video)
var initialState = {
    videos: videolist,
    fetchingData: false
}

export const todos = handleActions({
    [FETCH_DATA]: (state, action)=>{return Object.assign({},state,{fetchingData:action.payload})},
    [RECEIVE_DATA]: (state,action) => {return Object.assign({},state,{videos:action.payload})}
},initialState)

