Redux rests on three principles:
- Single source of truth: We have one place where all our data lives.
- State is read-only: No mutation; there is only one way to change state and that is through an action.
- Changes are made with pure functions: A new state is produced by taking the old state, applying the change, and producing the new state; the old state is never changed.
Let's explore these bullet points one by one.