Redux Data Flow
Redux Data Flow
Here is how data flows in Redux:
Initial State is renderd in the UI
An event is fired (user clicks a button)
The event handler calls the
dispatch()functionThe
dispatch()function sends the action to thereducer()functionThe
reducer()function returns a new state with updated valueThe new state is passed to the UI which reflects the changes.

Redux Key Principle
Single source of truth: The global state of your application is stored in an object tree within a single store.
State is read-only: The only way to change the state is to emit an action, an object describing what happened.
Changes are made with pure functions: To specify how the state tree is transformed by actions, you write pure reducers.

Redux Predictability

Last updated
Was this helpful?