Narrator: So, we've got a slightly better idea
of how middlewares work in Redux now.
They are sitting in between
our action creators and our reducers,
and they intercept any actions.
Once an action flows into a middleware,
the middleware can choose to console log it,
it can delete it,
it can stop it in its tracks,
it can modify it.
Basically, anything we really want to do,
we can do inside of a middleware.
And, as we work through this example,
we'll see some of the different conditions
or situations where we might want to
take all these different sorts of actions.
One other thing that we did in the last section
was we installed our boilerplate package.
We also installed our dependencies,
just to make sure that everything is installed
and running A-okay,
I'm gonna start up my development server
with "npm run start",
and then let's flip over to the browser,
and I'm just gonna verify
that everything is showing up properly.
And, there we go.
React simple starter at the top.
Very good.
All right, let's spend some time
to talk a little bit more
about the app that we're going to be building,
and specifically, how we're gonna be building it.
So, first thing I'm gonna pull
onto the screen is a mock-up of the app
that we're going to build.
So, it's gonna be pretty simple,
pretty straightforward.
Again, the real goal here is not to
build an interesting app so much
as it is to figure out how middleware works.
So, our app is gonna be very straightforward.
We're gonna make an AJAX request
to load up a list of users,
and then we're gonna show one badge
or profile component per user.
And, on each of these profiles,
we should have the user's name,
which, in this case,
I just called the user,
their company name,
so, what company they represent,
and, a very simple button that's just going to
allow us to click it and open
our favorite email editor or email client
and send an email to that very particular user.
So again, the goal here is not so much to
work on the React side of things.
The, the goal here is to work on the Redux side
of things and figure out more about middleware.
So, on that topic, let's talk more
about exactly how we're gonna build our app.
So, this is our process,
or how we're gonna put everything together.
This isn't information
that's super critical to have.
I just wanna make sure that
it's really clear to you
how we're gonna build the application
and, you know, some of the little pitfalls
as we're going through here.
So, the first thing we're gonna do is,
we're going to build our entire application
with just dummy data.
So, dummy data in this case is
data that we're just going to statically write
on the client side.
We're literally gonna write in objects,
one for each profile that we wanna show.
After we get our entire app working
with this dummy data,
so, this kind of client side data,
we're going to replace the dummy data
with an AJAX request.
So, we're gonna say,
Okay, we're no longer gonna use this client side only,
just the dummy data.
Instead, we're going to load it off
of a third-party server,
some external service to our application.
Only after we've done this
kind of AJAX loading portion
are we going to write the middleware
that we actually want to, you know,
get at and learn more about.
So, this is where we will hopefully spend
the bulk of our time.
We're going to write a middleware
to help us fetch our data.
We're gonna talk,
be talking more about exactly
what our middleware does,
and what its purpose is.
You know how it works, obviously,
when we get into these later two sections.
So, in the first portion of this,
this entire section,
we're going to be concerned
only with building our app.
We're gonna do it pretty quickly,
since it's gonna be some pretty,
you know, boring stuff.
We're just showing the list of users.
Nothing that exciting.
So, we're gonna get through this stuff
as fast as possible,
and then we're gonna dive
into the middleware stuff.
Again, I just want it to be clear
kinda the roadmap
or the path we're we're gonna take here
in getting to be more familiar with middleware.
Okay? So, with that in mind,
I will catch you in the next section,
where we will start building our app
with some dummy data.