This course has been updated! We now recommend you take the Complete Intro to React, v7 course.

Check out a free preview of the full Complete Intro to React, v3 (feat. Redux, Router & Flow) course:
The "Q&A: Async with Redux" Lesson is part of the full, Complete Intro to React, v3 (feat. Redux, Router & Flow) course featured in this preview video. Here's what you'd learn in this lesson:

Brian recaps async with Redux and takes questions from students.

Get Unlimited Access Now

Transcript from the "Q&A: Async with Redux" Lesson

>> Brian Holt: So we concluded making all of our Async with redux work. And now we have this really cool ability to come navigate under our site and make API request, cache them and then not re-request them, which I think is pretty compelling. So again, you just see that it just pops up right away, which I think is great.

>> Brian Holt: So this is the kind of the most simple way of doing asynchronous actions with Redux. Again you can get into libraries, like Redux promise is another one that I find very intuitive to use that you, instead of dispatching functions you dispatch promises, right? Same thing with redux observable, you just dispatch an observable with RXJS or something like that.

[00:00:50] And then sagas is kinda the heavy lifter. It's really cool, but I would assert that it's much more complicated and most difficult to kinda get your mind around. So if you're familiar, ES6 has another feature called generators. Which are really cool, they're really powerful, but they can be a bit unwieldy and kind of difficult to understand what's going on sometimes.

[00:01:14] With sagas you can just dispatch generators and take care of things and kind of complex orchestrations using various generators. So it's cool, but make sure you want to undertake that complexity if you gonna use them. But suffice to say, thunks usually handle most of your use cases, that's why I tend to stick with them.

[00:01:37] So does anyone have any questions about Redux in general?
>> Speaker 2: I was curious, the persistent data that you get between pages, can you do that with React still, or is that Redux specific?
>> Brian Holt: The answer is you can absolutely do it with React. But you're gonna have to have basically something on the side holding onto that data, right?

[00:02:03] If you unmount data, right? It's going to, or if you unmount the reactive component, it's going to lose all of it's state. So, it can't live in that state, however, if it's living up at the app level, right? App is still technically being rendered, so if you push that up into app, right?

[00:02:19] It's going to persist across different views, because it's still alive, it's still being rendered. So that's how you would achieve that. The good news here is we are done with application code, everything else I'm gonna show you from here on out is just more tools, more techniques, right?

[00:02:38] Tests, all that kind of stuff but now you pretty much have, I would deem, a full grasp on how to write React, and how to write at least the basic levels of Redux, not getting into the crazy stuff like that. There are still more facts of it that we heven't really explored.

[00:02:57] But sufficed to say that I have shown you, I would say 90% of use cases on both React and Redux. So I would say armed with the knowledge that I've shown you over the past two and a half days you can write large scale React applications. And I think that's pretty awesome that React is small enough and intuitive enough, at least I deem intuitive enough that you really can learn it in two and a half days.