Awesome stuff. When deciding between the two I chose Redux-Thunk just because it clicked faster. I've been curious about Saga lately, what's the advantage?
Hi Jordan, thank you!
I think the main advantage saga has over thunk is the testability. Generator functions return iterators. So you can pretty easily see, what's going on in your function by calling .next().
Awesome stuff. When deciding between the two I chose Redux-Thunk just because it clicked faster. I've been curious about Saga lately, what's the advantage?
Hi Jordan, thank you!
I think the main advantage saga has over thunk is the testability. Generator functions return iterators. So you can pretty easily see, what's going on in your function by calling .next().
Here's an example to test sagas: redux-saga.js.org/docs/basics/Disp...
OR
redux-saga.js.org/docs/advanced/Te...