What do these three dots in React do?

前端 未结 29 2587
不思量自难忘°
不思量自难忘° 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:25

    Is usually called spread operator, it is use to expand wherever is required

    example

    const SomeStyle = {
       margin:10,
       background:#somehexa
    }
    

    you can use this where ever you requires it more about spread operator Spread syntax.

提交回复
热议问题