reading-notes

Reading: Application State with Redux

Redux is a predictable state container for JavaScript apps, primarily used with React. It helps manage the application’s state in a centralized store, making it easier to maintain and manage.

Dan Abramov Redux Tutorials

First Principle of Redux

The first principle of Redux is that the entire state of the application is stored in a single immutable state tree. This state tree is represented as a plain JavaScript object.

Store and Reducers

Redux Store Methods

  1. getState(): Returns the current state of the Redux store.
  2. dispatch(action): Dispatches an action to the Redux store. This action triggers the state change.
  3. subscribe(listener): Registers a listener function that will be called whenever the state in the Redux store changes.

combineReducers()

combineReducers() is a utility function provided by Redux that combines multiple reducers into a single reducer function. It helps manage different parts of the state tree independently by delegating the state updates to the corresponding reducers.

Bookmark and Review

Reflection & things to know more of