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

useState Syntax with a Generic

Arrange the syntax of useState with an explicit generic type:

Items to put in order

  • (null);
  • useState
  • <Planet | null>
  • const [planet, setPlanet] =

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