📜  JSX 元素类型“ButtonComponent”没有任何构造或调用签名 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:03:21.949000             🧑  作者: Mango

代码示例1
Assert the variable as a React.ElementType

Example:

const Component = (isFoo ? FooComponent : BarComponent) as React.ElementType