Adding Saga to the application

From inside the application root, we can add Saga as follows:

yarn add redux-saga
OR
npm install --save redux-saga

While the library can be used directly in containers to pass in a higher-order function, we are going to use Saga as middleware. Later, we will be discussing the benefits of having it as middleware. 

In order to run Saga, we require two things:

  • A Saga middleware with a list of Saga functions
  • We need to connect middleware to the Redux store
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset