From the course: Building Modern Projects with React
Unlock the full course today
Join today to access over 22,400 courses taught by industry experts or purchase this course individually.
How does Redux work?
From the course: Building Modern Projects with React
How does Redux work?
Now that we have a pretty good idea of the major problems Redux was created to solve, namely props drilling, state sharing, and global state chaos. Let's take a look at how it actually works. Well the name Redux might intimidate a lot of people, as names that end in 'x' tend to do, it's actually a fairly straight forward concept and process. Earlier, we learned about both the benefits and perhaps more importantly the rather crippling drawbacks of having a single, unrestricted global state that's accessible by all our components. That being said, one of the core concepts of Redux is that we have one central, global state called the store that all our components can access. Now this store is essentially a big J-son object that serves as the single source of truth for all of our components. And in theory it can hold any kind of data that we need it to. Although in practice there are some things that are better off without it,…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
Why do you need Redux?4m 11s
-
How does Redux work?4m 35s
-
Adding Redux to a React app3m 24s
-
Creating Redux actions4m 16s
-
Creating reducers6m 23s
-
Connecting components to the store7m 1s
-
Running a React-Redux application4m 32s
-
Persisting the Redux store6m 43s
-
Redux DevTools3m 34s
-
Redux best practices3m 53s
-
Challenge: Adding a Redux flow1m 56s
-
Solution: Adding a Redux flow4m 14s
-
-
-
-
-
-