Mid From PDF React React.js

What are thunks and sagas? Feature Thunks (redux-thunk) Sagas (redux-saga) Concept Functions returned from

ctions

Generator-based side effects

Complexity Simple Advanced

Syntax Imperative (JS functions) Declarative (generators/yield)

Use case Basic async logic Complex flows, retries, delays

✅ Thunk example:

const fetchUser = () => (dispatch) => {

fetch("/api/user")

.then(res => res.json())

.then(data => dispatch({ type: "SET_USER", payload: data }));

};

More from React.js Tutorial

All questions for this course
Toolliyo Assistant
Ask about tutorials, ebooks, training, pricing, mentor services, and support. I use public site content only—not admin or internal tools.

care@toolliyo.com

Need callback? Share your details