I know you can copy an array with the spread operator:
const itemsArr = [...this.state.itemsArr];
and you can destructure an array that's an object key's value:
const { itemsArr } = this.state
Is there a way to combine them into one step? Pseudocode:
const { itemsArr } = [...this.state]
or
const { [...itemsArr] } = this.state
EDIT: Is there a way to combine them into one step, so as to avoid typing "itemsArr" twice?