Put in order · JavaScript and React course · Module 11: Data Fetching and APIs

Adding New Data to a List

Arrange the syntax for adding new elements to existing ones in pagination (spread operator):

Items to put in order

  • [...prev,
  • setItems(prev =>
  • )
  • ...newItems]

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