OK so you've heard about redux your friends have told you that it's the new hot javascript framework 2
and any want to learn it but what the heck is it in the first place right. 3
What does it do for us. 4
To it bring to the table that's so different from backbone angular or any other off the shelf javascript 5
framework. 6
In this section we're going to talk about what redux is and what we gain by using it. 7
Redux his own home pay own home page says that redox is a predictable state container for javascript 8
applications. 9
Or I don't know about you. 10
I don't consider myself very dumb but the first dozen times or so that I read that line I had just absolutely 11
no idea what it meant. 12
So we're going to try to figure out what that means by looking at an example and to pull up a diagram 13
here really quick. 14
Let's consider a traditional javascript application. 15
Let's say that we're making an app that displays a list of books and it can show a list of books over 16
here on the left hand side. 17
When a user clicks on a book it will show details about that book to the user. 18
So in this case it's going to show book number three. 19
You know we can assume that the user clicked on book number three here in the C book there were three 20
at the top. 21
They have an author number of pages and genre for that particular book. 22
So this app is simple enough right. 23
When I click on another book it should show me details of that other one. 24
Right. 25
Simple enough behavior is nothing crazy. 26
Let's take a second though and consider the structure of the application both on the View layer. 27
You know what we visually see in on the data layer as well. 28
So I get to pull up another diagram here. 29
If you think about it the app is really divided into two separate parts. 30
The data that powers the app and the views that display that data. 31
There's two types of data that make that app work a list of books which are displayed on the sidebar 32
and a currently selected book which is displayed in the detail view on the View side we have a list 33
view a list item and a detail view the detail view just like the app which is put together shows a detail 34
about the currently selected book. 35
So with this diagram put together I want you to keep in mind here where I'm trying to really convey 36
here is that we want to try to separate the views in our application from the data in our application 37
. 38
The data is really sitting over here in its own separate bucket. 39
Right. 40
The two of them come together to make an actual working usable application. 41
OK. 42
So this might seem all esoteric but bear with me for a little bit. 43
And let's continue in the next section.