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?

How does Redux work?

From the course: Building Modern Projects with React

Start my 1-month free trial

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,…

Contents