Put in order · JavaScript and React course · Module 3: State and Events

React State Update Cycle

Arrange the steps of the React state update cycle from event to DOM update:

Items to put in order

  • React updates the DOM (changed elements)
  • React schedules a re-render of the component
  • The component renders with the new state
  • User clicks a button (event)
  • Handler calls setState with a new value

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