{"size": 393, "ext": "js", "max_stars_repo_path": "src/reducers/home.js", "max_stars_repo_name": "bobotieyang/react-latest-framework", "max_stars_repo_stars_event_min_datetime": "2019-10-21T07:25:52.000Z", "max_stars_repo_stars_event_max_datetime": "2019-10-29T07:52:54.000Z", "max_issues_repo_path": "src/reducers/home.js", "max_issues_repo_name": "1091820468/react-latest-framework", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "src/reducers/home.js", "max_forks_repo_name": "1091820468/react-latest-framework", "max_forks_repo_forks_event_min_datetime": "2019-12-02T08:18:11.000Z", "max_forks_repo_forks_event_max_datetime": "2019-12-02T08:18:11.000Z"}
{"max_stars_count": 2, "max_issues_count": null, "max_forks_count": 1, "avg_line_length": 17.0869565217, "max_line_length": 51, "alphanum_fraction": 0.5572519084}
// 初始化状态
let initNavList = {
  navMain: [],
  bookDetails: []
}

export function home(state = initNavList, action) {
  switch (action.type) {
    case 'RECEIVE_NAV':
      return {
        ...state, //三个点是展开符
        navMain: action.navMain
      }
    case 'RECEIVE_BOOK':
      return {
        ...state,
        bookDetails: action.bookDetails
      }
    default:
      return state
  }
}
