How Redux internally works?

chanduthedev
4 min readSep 21, 2024
Redux store flow with detailed explanation
Redux store flow

Redux is one of the difficult topics to understand. I will try to compare Redux with regular variable to understand better as most of you know how regular variable works. You can check here on what is Redux.

Regular Variables

  1. When to Store: You store values in variables based on the needs of your application logic.
  2. What to Store: You store the actual value you need.
  3. How to Store: You store values by assigning them to variables (e.g., let a = 1;).
  4. Where to Store: Values are stored in memory.

Example:

let a = 1; // Declare variable `a` with initial value 1
let b = 3; // Assign value 3 to variable `b`
let c = a + b; // Assign the result of `a + b` to `c`
console.log(c); // Output: 4

Redux Store

Redux is a state management library used in JavaScript applications, typically with React. It handles state differently from regular variables and is more suited for managing complex state across your application.

  1. When to Store: In Redux, the state is stored based on the actions and updates triggered by your application. State updates happen through actions and reducers.
  2. What to Store: The state managed by Redux contains data that your…

--

--