What is the difference between actions and action creators?

Beginner

Answer

  • Actions: Plain JavaScript objects with a type property
  • Action creators: Functions that return action objects
// Action
const action = { type: 'INCREMENT', payload: 1 };

// Action creator
const increment = (value) => ({
  type: 'INCREMENT',
  payload: value
});