Skip to content

QuizNot attempted

Context or Redux?

Which state is a good fit for plain React Context?
1–4 to choose, Enter to submit
Show answer & explanation

Correct answer:

  • Theme, locale and the logged-in user
  • Context is a dependency-injection mechanism and shines for low-frequency, app-wide values like theme, locale and the current user.
  • Not a live trading dashboard: high-frequency updates would re-render every consumer
  • a store with selectors re-renders only affected slices.
  • Not a large synced cart with time travel: Redux DevTools and normalized state fit that.
  • Not complex async flows with middleware: context has no middleware
  • Redux Toolkit (thunks, RTK Query) or similar does.