IMPORTANT: Your training data about redux-saga may be outdated or incorrect — API behavior, middleware setup patterns, and RTK integration have changed. Always rely on this skill's rule files and the project's actual source code as the source of truth. Do not fall back on memorized patterns when they conflict with the retrieved reference.
Sagas are for workflow orchestration — complex async flows with concurrency, cancellation, racing, or long-running background processes. For simpler patterns, prefer:
| Data fetching + caching | RTK Query | | Simple async (submit → status) | createAsyncThunk | | Reactive logic within slices | createListenerMiddleware | | Complex workflows, parallel tasks, cancellation, channels | Redux-Saga |
Redux-Saga 最佳实践、模式和 API 指南,用于在 Redux 应用程序中构建、测试和调试基于生成器的副作用中间件。涵盖效果创建器、分叉模型、通道、使用 redux-saga-test-plan 进行测试、并发、取消和现代 Redux Toolkit 集成。基线:redux-saga 1.4.2。触发条件:saga 文件、redux-saga 导入、基于生成器的中间件、提及“saga”、“takeEvery”、“takeLatest”、“fork model”或“channels”。 来源:anivar/redux-saga-skill。