0 votes
in React JS by (1.8k points)

What are the differences between redux-saga and redux-thunk?

1 Answer

0 votes
by (1.8k points)

Both Redux Thunk and Redux Saga take care of dealing with side effects. In most of the scenarios, Thunk uses Promises to deal with them, whereas Saga uses Generators. Thunk is simple to use and Promises are familiar to many developers, Sagas/Generators are more powerful but you will need to learn them. But both middleware can coexist, so you can start with Thunks and introduce Sagas when/if you need them.

Related questions

0 votes
asked Jun 19, 2020 in React JS by JackTerrance (1.8k points)
0 votes
asked Mar 4, 2020 in React JS by JackTerrance (1.8k points)
0 votes
asked Mar 4, 2020 in React JS by JackTerrance (1.8k points)
0 votes
asked Jun 19, 2020 in React JS by JackTerrance (1.8k points)
0 votes
asked Mar 4, 2020 in React JS by JackTerrance (1.8k points)
0 votes
asked Nov 26, 2019 in React JS by AdilsonLima (5.7k points)
0 votes
asked Jul 2, 2019 in React JS by Venkatshastri (1.4k points)
+1 vote
...