Answer the question
In order to leave comments, you need to log in
What about redux-saga?
Good afternoon! Interested in the opinion of experienced about redux-saga . What are its advantages and when to use it?
At the moment there is a project on react-native in which they are convinced to use it.
For now, I see in it only the syntax is not very clear and that's it.
There is no experience with react-native yet (only with react), perhaps using the saga here will come in handy.
In previous react projects, axios was used and I was quite happy with it.
So, I will be grateful for smart thoughts on this topic)
Thank you!
Answer the question
In order to leave comments, you need to log in
Redax-thunk and redax-saga differ in their approaches. The first one generates ordinary actions (request, success, error) through an asynchronous action and they are already processed through a reducer. Sagas, on the other hand, subscribe to a regular action and, through the mechanism of generators, perform asynchronous actions, which, again, thanks to generators, are easier to test.
By and large, the saga is a more powerful tool with which you can do everything the same as with the help of tanks and even more. Sagas are easier to test because they are declarative (i.e. they describe asynchronous actions, but they are called inside the middleware).
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question