redux-saga middleware
redux-saga
is a third-party JavaScript library that helps to easily and efficiently manage an application's side effects, including asynchronous activities such as fetching data and accessing browser cache.
Mukhiya and Hung outline the essential importance of using redux-saga
in a web application. We can use the image used in this paper as a reference to better understand the need for redux-saga
. To explain it in one sentence, we can say that redux-saga
is responsible for handling side effects. Saga uses ES6 Generators (https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/function*) to make asynchronous flows easy to read, write, and test. If you are not familiar with generators, it would be best to pause before the next section and read up on them. Here is a couple of suggested articles: https://redux-saga.js.org/docs/ExternalResources.html.
Basically, generators are functions that provide the flexibility to be paused and resumed rather than...