Redux Saga

Redux Saga is a fast-growing library with over 9,000 stars on GitHub. It lets you rapidly create asynchronous apps using a new tool called ES6 Generators. In this course, you'll learn about Redux Saga, ES6, testing, effects, and channels.
Course info
Rating
(97)
Level
Advanced
Updated
Aug 21, 2017
Duration
2h 54m
Table of contents
Course Overview
Introduction
Introducing Redux Saga
Asynchronous ES6 and Yield
Redux Saga Effects
Channels
Testing Redux Saga Applications
Conclusion
Description
Course info
Rating
(97)
Level
Advanced
Updated
Aug 21, 2017
Duration
2h 54m
Description

The basis of any good, modern Redux application is the ability to orchestrate asynchronous calls to outside APIs, while working with the mostly synchronous language of JavaScript. In this course, Redux Saga, you'll learn the skills you need to vastly improve your Redux application performance and development time. Throughout the course, you'll be building a non-trivial shopping cart application, where users can add or remove cart items, see shipping and tax totals, and check out, all while keeping state synchronized with the server. First, you'll delve into Redux Saga, its uses and origins, and how it fits in with other Redux middlewares. Next, you'll explore nearly ever Redux Saga effect, each illustrated with an example. Finally, you'll discover Redux Saga channels, testing, and other advanced topics. By the end of this course, you'll have the necessary knowledge to build a whole application using Redux Saga.

About the author
About the author

Daniel Stern is a freelance web developer from Toronto, Ontario who specializes in Angular, ES6, TypeScript and React. His work has been featured in CSS Weekly, JavaScript Weekly and at Full Stack Conf in England.

More from the author
Vue.js: Big Picture
Beginner
1h 6m
Aug 31, 2018
Testing React Applications with Jest
Intermediate
3h 36m
May 11, 2018
More courses by Daniel Stern
Section Introduction Transcripts
Section Introduction Transcripts

Course Overview
Redux Saga. Whether you are one of the nearly 10, 0000 coders who have started on GitHub or one who's just starting to learn about it, it's a library that can rapidly accelerate your web application development. What I love most about Redux Saga is how it directly saves me time when writing all sorts of everyday applications, dealing with vendor endpoints, saving data to databases, and communicating with APIs are just a few of the ways you can use Redux Saga. In this course I teach you how to do exactly that over 7 modules with hours of explanation and over 100 visual aids. In my course, Redux Saga, I teach you the practical skills you need in order to master Redux Saga, both at work and at the home office. We'll learn about sagas and asynchronous ES6, then move onto Redux Saga effects, channels, and testing. Overall, I can't believe how much information I was able to pack into this short course. By the time you've completed watching this course you'll know how to build a whole application using Redux and Redux Saga. In the demo application we'll be building, a nontrivial and full-featured shopping cart component that would feel at home on any ecommerce giant's website, you'll learn to orchestrate asynchronous threads, handle Ajax request with just one line of code, and execute numerous concurrent API requests all with plenty of instruction and my own detailed explanations. Are you still writing your JavaScript code using promises and callbacks? Still stuck on Redux Thunk? Don't be among those left behind, instead, learn the new, better way, not just for building React and Redux applications, but for all of your asynchronous needs. If you're ready to write better applications with fewer lines of code and rapidly accelerate your career by learning the skills that are in demand today, then get ready to begin your own saga with Redux Saga. Start watching the first module now.

Introducing Redux Saga
In this module we'll be introducing Redux Saga. We'll be laying out all the foundational information that you need to interact with this course and with Redux Saga in the most efficient manner. We begin this module with a simple, but important question, what is Redux Saga? First and foremost Redux Saga is Redux middleware. That means it needs to be added to a Redux store somewhere in the middleware chain for it to have any effect. Once it has been added as middleware it consumes the actions that come out of your application. In response, it occasionally dispatches other actions or creates side effects. Side effects include interactions with databases, with outside APIs, etc. Finally, unlike other middlewares, like Redux Thunk, Redux Saga maintains continuously-running processes, called sagas, to manage the logic of the application. Using these Sagas effectively is a large part of what using Redux Saga is all about, but what are sagas? In the next clip, we'll find out.

Asynchronous ES6 and Yield
In this module we'll be learning about Asynchronous ES6 and Yield. Let's start with a quick introduction. First, we'll discuss the yield operator, what is it, and what are its advantages and disadvantages. We'll learn about generator functions and how they contain the yield keyword. After that we'll look into the yield keyword's strange relationship with ES6 promises, another tool used to get asynchronous performance. And finally we'll learn about how to wrap generators so that they'll work outside of a generator environment. In the next clip we'll discover what is yield.

Redux Saga Effects
In this module we'll be discussing and learning about Redux Saga Effects. So first of all, we're going to understand effects, what are they, and how do we use them in our application? Then we're going to have a review of almost every Redux Saga effect and use them in our application. We're going to summarize the following effects over the course of this module, put, select, take, takeLatest, takeEvery, call, fork, and even a few more. We'll also be using the cancel effect to stop threads as opposed to starting them with different effects. In the next clip we'll start to learn about what effects are.

Channels
In this module, we'll be discussing channels. Channels are utility provided by Redux Saga that allow us to do things that are more advanced than what can be done using effects alone. Here's what we'll be discussing in this module. First, we'll ask and answer the question, what are channels? Then we'll take some time, learning about and implementing action channels, generic channels, and event channels. Which make up three kind of channels provided by Redux Saga. After that's complete, we'll finish the remaining sagas. Effectively finishing our application all. In the next clip, we'll begin our discussion with action channels.

Testing Redux Saga Applications
In this module we'll be discussing and applying testing Redux Saga applications. Specifically we'll discuss methods for testing Redux Saga applications, we'll understand the principles behind creating testable sagas, and then we'll run a couple of test that will exist right within our application. First, we'll discuss testing Redux Saga applications.