I don"t quite understand this when I have come into contact with react, recently. The following code
state = {
collapsed: false,
theme : "dark",
result: [],
};
and when I defined it, I found:
const result = this.state.result;
is equivalent to
const {result} = this.state;
what is this principle? is it automatically injected?