What do these three dots in React do?

前端 未结 29 3086
不思量自难忘°
不思量自难忘° 2020-11-21 23:53

What does the ... do in this React (using JSX) code and what is it called?



        
29条回答
  •  南方客
    南方客 (楼主)
    2020-11-22 00:27

    For those who come from the Python world, JSX Spread Attributes are equivalent to Unpacking Argument Lists (the Python **-operator).

    I'm aware this is a JSX question, but working with analogies sometimes helps to get it faster.

提交回复
热议问题