Redux Promise Middleware: Automatic Pending / Fulfilled / Rejected

Hands-on practice for this lecture. Write the code, see it run, understand the pattern.

1

Exercise 1 of 1

Fix the Promise Middleware Reducer

The store is wired with redux-promise-middleware but the tasks never load. Fix two case names in the reducer to match the suffixes the middleware actually dispatches.

Task

The store is wired with redux-promise-middleware and the action creator already returns a Promise as payload. But the tasks never load.

Open store.js and fix the two reducer case names so they match what the middleware actually dispatches.

  1. Change FETCH_TASKS_REQUEST to FETCH_TASKS_PENDING
  2. Change FETCH_TASKS_SUCCESS to FETCH_TASKS_FULFILLED
Loading editor…
Practice: Redux Promise Middleware: Automatic Pending / Fulfilled / Rejected — Interactive Exercises | Durgesh Rai