What is a Redux store?

Beginner

Answer

The Redux store is a single JavaScript object that holds the complete state tree of your application. It provides methods to:

  • getState(): Returns current state
  • dispatch(action): Dispatches an action to trigger state change
  • subscribe(listener): Registers a listener function
import { createStore } from 'redux';
const store = createStore(reducer);