👋 Next.js Conf 2024: Come build, party, run, and connect with us! See all events

Structure: List items must be an array

The desk structure list takes an array of items. A common mistake is to passing a list of items as arguments instead of an array:

// Incorrect:
S.list()
  .title('Content')
  .items(
    S.listItem().title('Foo'),
    S.listItem().title('Bar')
  )

// Correct:
S.list()
  .title('Content')
  .items([
    S.listItem().title('Foo'),
    S.listItem().title('Bar')
  ])

Was this article helpful?