saga-fetch is a Redux Saga helper that simplifies fetching data by dispatching start, success, error, and fulfill actions. It wraps async methods like window.fetch or axios, handling the boilerplate of action dispatching in saga workers. Version 1.3.14 is current; it's stable with no recent updates. Requires redux-saga >=1.0.2. Compared to alternatives like redux-saga-routines, it focuses solely on fetch workers with explicit action mapping.
npm install saga-fetchNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Demonstrates basic usage with fetch, fork, and action creators for start/success/error/fulfill.
Pass action creators that return action objects, not type strings.
Ensure method takes `{ payload }` and returns promise, e.g., `({ payload }) => fetch(url)`.Provide a fulfill action if you need to reset loading state after completion.
Consider alternatives like redux-saga-routines or custom saga code.
Ensure start, success, error, fulfill are action creators returning plain objects, e.g., `(payload) => ({ type: 'ACTION', payload })`.Pass a function that returns a promise: `({ payload }) => fetch(url)`.Ensure all required options are provided: action, method, start, success, error.