Put in order · JavaScript and React course · Module 12: React and TypeScript

Calling dispatch with an Action

Arrange a correct dispatch call with a typed action:

Items to put in order

  • payload: newItem
  • type: "ADD_ITEM",
  • });
  • dispatch({

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