Grokking React Advanced
Vote

0% completed

​

Working with the Store in Redux

Three methods are all that application code calls on a Redux store: getState() returns the current state, dispatch(action) runs the reducer with an action, and subscribe(listener) registers a function to call after every dispatch. The store is the object that holds the current state and the root reducer together and offers these three methods. The actions and the reducer from the previous lessons do nothing until a store connects them.

A store in twenty lines

The real store does more checking, but its central behavior fits in a short function

.....

.....

.....

Like the course? Get enrolled and start learning!

Reading Progress

0%


Vote for new content