[英]Passing props to a react component wrapped in withRouter() function
[英]React component props wrapped inside braces?
我有一個組件定義為:
type myType = anotherType<weirdType1, weirdType2, weirdType3>;
function weirdComponent({q}: myType)
它被稱為: <weirdComponent {...myVar} />
,其中myVar
是myType
的一個實例。
什么{q}
在奇怪的組件 function 簽名中是什么意思
{...myVar}
做什么?
myType
是什么類型?
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.