Put in order · JavaScript and React course · Module 9: Modern React Hooks

useOptimistic Syntax

Arrange the destructuring syntax of the useOptimistic hook:

Items to put in order

  • useOptimistic(
  • =
  • const
  • [optimisticState, addOptimistic]
  • state, updateFn);

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