-: All right my friends,
I think our project is really coming together here.
Let's do a quick wrap up in this section.
I'm gonna first start inside
of our Action creator's file.
Inside of here we learned a lot of interesting things
around working with Redux Thunk.
I wanna specifically point out the fact
that when we make use of Redux Thunk,
you will frequently see it with this abbreviated syntax.
Remember when we have this arrow function right here
all it means is that we've got one function
that's returning another function.
The child function gets called with that dispatch method.
And dispatch allows us to manually send any number
of actions we want to into our Redux store.
When we call dispatch and pass into action
the action gets sent to all
of our middlewares and then forwarded
on to all the reducers in our application.
Inside of our signup Action creator,
we make use of local storage to store the JSON web token
that we got back from our API.
Now, one thing I wanna mention about local storage.
It's kind of undecided in the web development community
as to whether or not local storage
is truly a secure location to put a JSON web token.
In theory if someone manages to execute
a cross-site scripting attack on your website,
they could possibly pull the token out of local storage,
and then use it to impersonate that user.
This is really an unsolved problem right now
and when you're using JSON web tokens
well local storage is possibly
one of the best possibilities or solutions you get,
but it's not necessarily the end all be all solution.
And standards around storage of local
of JSON web tokens are still developing.
Then inside of our require auth dot js file
and our components directory,
I wanna point out that we very, very successfully reused
our require auth higher order component.
I really encourage you to think
about putting together higher order components
on your own personal projects
and figuring out ways to extend functionality
of your simple components with higher order components
that you can reuse on future projects you put together.
Really this was a great example of how we put one together
on our earlier project and then very easily reused it
on this newer project that we were working on.
And the last thing I wanna talk
about very briefly is what we just did
in the last section where we imported a CSS file
into our header dot js file.
A lot of people don't know this,
but yes create react app is wired to allow you to
import CSS files directly into your JavaScript code.
And create react app ships with some configuration
for Webpack that handles this in an appropriate fashion.
Okay so I think that's about it of some
of the high points on the client side of this project.
So I hope you enjoyed putting this project together
'cuz it certainly was a lot of fun to put together with you
and I hope to see you
on another course at some point in the future.