Join Richard Gill for an in-depth discussion in this video Loading the Reddit posts using Redux, part of Performing Complex State Management with Redux.
- [Tutor] Loading the Reddit Posts Using Redux.…In this video, we're gonna have a look at…how we can use Firebase with the existing code we have…to quickly load the Reddit post into Redux.…So let's start off by seeing where we actually load…the Reddit post in today.…So you can see we're using state here…to say that there are no Reddit posts…and you can see we do a Firebase call…and then when that comes back, we set the state.…So the first thing is with Redux,…probably we're not really gonna use state very much,…so let's get rid of this,…'cause this was just us playing around.…
This code is gonna move to an action…and this code here will no longer exist,…so I'm going to,…so instead here, we're going to probably call an action,…so we need to cut this code here and then export const,…We'll call it loadPosts,…so this goes and grabs the posts that we need.…Now it's an asynchronous thing,…because we go to Firebase and we say,…hey, Firebase, could we have the post please?…And then at some point in the future,…it comes back with those posts,…
Note: This course was created by Packt Publishing.
- What is Redux?
- Connecting your components to the store
- Firing actions
- Applying Redux reducer
- Using advanced reducers
- Dispatching asynchronous actions with Thunk
- Building a workable application