Great analogy and description.
Enrique Montalvo
11

Thanks for reading the article — I had the same exact question as you when I first dabbled with Redux. Even though Redux manages the application state and React manages the view, how are the two connected? In other words, what’s the communication layer in between that notifies the views that the application store has changed?

The magic here is with a package called React-Redux (https://github.com/reactjs/react-redux). Without going too much into details, this package represents the glue between these two other libraries by taking advantage of a feature in React called “Context” — this link is a great resource to learn more: https://facebook.github.io/react/docs/context.html. By using this React feature, you’re able to create a high level component that can pass properties down to its inner components without during `props` directly. In the case of React-Redux, it uses context to pass the application store to whichever components you have “connected” to Redux.

I plan to write a future post on React-Redux just to better explain this, but hope this helps!