πŸ‘€ See Sanity in action: Watch product demo now β†’

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?