import { Map, fromJS } from 'immutable'

export function testData(state = Map(fromJS({
  loading: false,
  title: '我是app默认的title', 
  count: 1
})), action) {
  switch (action.type) {
    case 'updateTitle':
      return state.sf(['title'], action.data)
    case 'updateCount':
      return state.sf(['count'], action.data)
    default:
      return state
  }
}
