M
M
Maxim Korolsky2017-03-15 21:03:48
redux
Maxim Korolsky, 2017-03-15 21:03:48

Why Redux Saga if there is Redux Thunk?

Why Redux Saga if there is Redux Thunk A bunch
of methods, huge documentation who needs it?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Serhiy Koziuk, 2017-04-28
@Serhiy_Koziuk

Redux-saga is an alternative approach to organizing side effects. Instead of dispatching functions that are processed by redux-thunk, you create a saga that collects all the processing logic inside itself. Unlike thunks, which are executed when you dispatch them, sagas are launched at application startup and “run in the background” as it were. Sagas listen to all the actions that the store dispatches and decide what to do with them.
And sagas in redux have two advantages over thunks:
- They allow you to organize complex sequences of side effects
- And they are very easy to test

I
Islam Ibakaev, 2017-03-24
@devellopah

If you doubt whether you need this dependency in the project, then it is not needed.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question