How to understand {list: {list}} = this.props; in es6,ant design pro?

the code is here, line 64

https://github.com/ant-design.

I don"t quite understand why. I need to add {list} after list, and I haven"t seen a similar syntax in es6

.

is it any good for them to write like this?

how to understand it? thank you

Nov.20,2021

the original text is:

const {
      form,
      list: { list },
      loading,
    } = this.props; 

this is the deconstruction assignment of ES6

> let {a,b:{b},c} = {a:1,b:{b:2},c:3}
> a
< 1
> b
< 2
> c
< 3

ES6 deconstruction


this is the deconstruction assignment, which can be understood to mean that the structure of the objects on both sides is consistent, and then assign the value on the right to the variable on the left

.
Menu