Question · JavaScript and React course · Module 8: Advanced React Patterns

Custom Hook Return Value

What does a custom hook most commonly return?

Answer options

  • An object or array with state values and functions to update it
  • A JSX component ready to be rendered
  • A Promise with data from the server
  • A reference to a DOM element

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