5
Tôi đã một đối tượng gọi this.props
chứaES6 đối tượng lồng nhau sâu destructuring
{
actions: Object,
dirty: false,
form: "Statement",
autofill: functon(),
**statement: Object**
}
statement
chứa
{
firstName: "John"
lastName: "Peter"
isConfirmed: true
}
Tôi muốn trích xuất statement
đối tượng và isConfirmed
tài sản trong cùng một dòng sử dụng destructuring es6
Tôi đã thử
const { statement: isConfirmed, isAdmin } = this.props
mà tôi nhận được một lỗi khi tôi làm let a = isConfirmed, b = statement