I have:
const { state: { mode } } = this
console.log(mode) //'mode'
console.log(state) //undefined
I want to declare the state
variable as well.
Is there a way to destructure this without breaking it into two statements?
const { state } = this
const { mode } = state