re: async actions in redux VIEW POST

FULL DISCUSSION
 

Great and easy to grasp examples!
In your reducer example, did you mean to write this for the FETCHING_COMIC case?:

case 'FETCHING_COMIC':
  return {
    ...state,
    loading: true
  }
 

Yeah, rather:

 case 'FETCHING_COMIC':
      return {
        ...state,
        fetching: true,
        comic: action.comic
      }
const initialState = {
  fetching: false,
  error: false,
  comic: null
}

What say?

code of conduct - report abuse