Question · JavaScript and React course · Module 4: Context API and useReducer

The useReducer Hook

What does the useReducer hook return?

Answer options

  • Only the current state
  • An object with state and dispatch fields
  • An array containing [state, dispatch]
  • A reducer function

You can check the correct answer by solving this task in the CodeWorlds game.