August 2017
Beginner
374 pages
10h 41m
English
Now we are going to implement the error reducer, which is going to handle error-related actions:
export default function errorReducer (state = {}, action) { if (action.type.endsWith('_FAILURE')) {
return action.error }
return state}
// ...other imports...import errorReducer from './error'const appReducer = combineReducers({ // ...other reducers... error: ...Read now
Unlock full access