import { Map, fromJS } from 'immutable'

export function showState(state = Map(fromJS({
  loading: false
})), action) {
  // 框架在初始化state的值时，action默认带一个type小于1的随机值(即：action={type: 0.12354556435634})，这里判断小于1时返回默认值
  if (action.type && action.type < 1)
    return state
  state = state.sf(['loading'], action)
  return state
}
