In this video there's one other very quick thing I want to show you with redux dev tools.
This is not going to be a feature that is immediately super useful for us but we're going to end up
making use of this other feature in redux stepped tools at great length later on inside this course.
So let me tell you what this little feature is inside of our address bar.
We're going to navigate to our application at local host Colin 3000.
But then we're going to put on this little query string right here.
We're going to put on a question mark de-bug underscore session equals and then some random string of
characters.
When you do this redux step tools is going to see that you are trying to start up a debug session a
debug session is where redux dev tools is going to automatically save all of the data inside of your
redux store and persist it across refreshes of your application.
So you'd normally when we refresh our application all the data inside of a redux store falls away and
we lose it entirely.
When you enable this debug session redux step tools is going to make sure that all the data stays around
between refreshes of the page.
So this is incredibly useful when we start doing some advanced feature development and we're going to
see how useful it is later on inside the course.
Let's very quickly check out this little feature and see how it works.
So I'm going to go back to my application and in the address bar I'm going to go to question mark de-bug
underscore session and then some random string of characters.
Like so now once I'm here I'm then going to sign out and then sign back in.
Now when I do so you'll notice I now have a couple of actions that have been dispatched to my store.
I have the initial sign in from when I refreshed the page I have a sign out from when I click the sign
out button and I have another sign in from when I sign back in.
Now here's the magic if I refreshed this page I'm still going to see the same list of actions here.
So redux dev tools has persisted all those actions and all the states across the refresh and we have
not dropped off or lost any data.
What's really great about this is that we can now go back and jump to some previous state just as we
did before by clicking that little jump button where it could jump to the sign in or back to present
which would be the most recent sign in right there.
Like I said this is really useful for debugging.
And we're going to use this at great length later on it inside the course.
One thing I want you to be aware of is that once you're done with a debug session you are going to want
to remove that query string out of your otherwise redux step tools are just going to continuously try
to throw your previous state into your store.
And sometimes you really don't want that.
Particularly if you change some reduce search or return some other form of data like maybe an array
instead of an object.
If you continue running 80 bucks session you'll very quickly start to run into errors because redux
tools is trying to throw data into your stored that is no longer valid.
Now the other thing I want to show you really quickly is sometimes we might want to have some named
debug sessions so maybe I would give this one a name of like logged in like so and then I would make
sure that inside this debug session I am logged in and then maybe I will make another debug session
called logged out like so and then I could sign out here.
So now I have two separate debug sessions that are running one where I am logged in the other where
I am not logged in.
So if I wanted to I can now easily go back to the previous debug session like go into a logged underscore
in and I'm going to essentially retrieve the previous state that I had.
You can actually see over here the previous state from the logged in debug session had me signed in.
Now immediately after I loaded the page the API libraries said oh you're not signed in anymore because
I actually had signed out so it's going to dispatch the sign out action but essentially by creating
these different debug sessions I can have these different kind of checkpoints of state inside of my
application.
That again makes it really easy to develop and debug certain features.
Now just one more time.
Remember any time that you are done with the debug session make sure you take off that query string.
Otherwise you're going to try to throw some data into your store that you probably don't want to throw
in.
So I'm going to go back to local history.
We'll take a pause right here and this time we will actually continue with redux for him in the next
video.
So quick pause and I'll see you in just a minute.