Can update setState be an array?

friends, I’m asking for help.
how to increment setState with array? every update must add an item in the array.

i tried this

self.$setState({
name: [self.name, id]
})

but this appears

image

self.$setState({
  name: [...self.name, id]
})

thanks, it worked :slight_smile:
one more thing, how to update the array which has the same id and only the “jumlah” changes??

image

self.name[1].jumlah = '3';
self.$setState({
  name: [...self.name, id]
})