New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Convert from redux-thunk to redux-saga #314
Comments
Check out this tutorial I made: https://forum.shakacode.com/t/experimenting-with-generators/657 |
As of right now, Thunk is easier to understand and debug. See #315. We should probably make a new project with thunk. That being said, it's a great exercise to convert the 2 simple async calls to thunk in a PR. |
I'll look at this issue |
See #325 |
Just curious, do you all find the conceptual overhead of redux-saga worth it? I've used Thunks extensively in a production application, and have had no issues or complaints. In terms of testability, it still seems like you have to manipulate generator internals, which seems like a leaky abstraction. With Thunks, it seems like it would be possible to mock out XHR via Jest which would seem more straightforward. I've also heard from less experienced members on my team that sagas were tough to debug and not as straightforward to use as Thunks. Again, I don't have direct experience with sagas, just looking for an opinion from someone that's used both. |
@yangmillstheory You should be able to mock either the saga or thunk with jest. In terms of debugging, yes, the chrome debugger is not good inside of the generator function. You have to use print statements. I think they are both good ways. |
This one should have gotten merged. Any takers that want to create an updated PR with this? |
I'm looking for opinions here.
At team ShakaCode, we're using redux-saga rather than redux-thunk for new projects.
Options:
References:
The text was updated successfully, but these errors were encountered: