Skip to content

This a basic sample to showcase integration of redux-saga with redux , react , redux-react

License

Notifications You must be signed in to change notification settings

SVRao19056/basic-redux-saga-sample

Repository files navigation

basic-redux-saga-sample

This package show cases the integration of redux-saga with redux and react. This is a code sample companion for the article authored by me. click here for the companion article.

Intent

This is to provide a scafolding for redux-saga integration. This represents the final version after a number of iterations. I want to share my learnings which may benefit those who are just embarking on this journey.

Acknowledgements

Shout out to Jasmine Bamou ! The article click here authored by Jasmine Bamou was the source of inspiration for this endeavor. Thank You!

Introduction

The integration of redux saga is an ochestration between react-saga , redux , react , react-redux libraries . If you are not familar with these libraries , I would strongle encourage you to review the companion article here.

Only high level concepts are provided here for a comprehensive review click here.

What is middleware?

Middlleware has different connotations in the software arena. In this context, it acts as a interceptor between the consumer (the application) and the original recipient (API endpoint). The middleware in this case defers the dispatch to the redux store until the API request is fulfilled.

The need for middleware.

Since redux is synchronous and consuming REST API endpoints with asynchronous requests is the industry trend. The middleware serves to bridge the gap between redux and the deferred API response. Both redux-thunk and redux-saga are middleware.

What is redux saga?

saga introduction

How does saga work?

How does saga work

What are saga effects?

What is a saga effect

Usage Details skip to next section

The intent is to provide flavor of the scafolding for a saga-redux integration. Some aspects will probably need to be adjusted to meet your organization standards and conventions.

Steps

  1. Clone the repository to a local folder Open a terminal with VS Code or Bash and execute the following
  2. npm install
  3. npn run-script build
  4. npm run-script start When all goes well you should see something similar to the below screenhot. npm run screenshot

Code Walk Through

Orchestration steps

Step1 |

|Step2 |

|Step3 |

|Step4 |

About

This a basic sample to showcase integration of redux-saga with redux , react , redux-react

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published