Structured Content 2022: Join our conference to explore fresh perspectives on content and digital experiences →

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?