Reactjs 当使用情感反应和打字脚本时,道具和内部道具有什么区别?
我正在尝试将类型添加到我的StyledComponents(情感反应)。 假设我有一个样式化的按钮组件,当我用泛型StyledComponent声明它的类型时,我需要向它传递3个类型变量:Reactjs 当使用情感反应和打字脚本时,道具和内部道具有什么区别?,reactjs,emotion,Reactjs,Emotion,我正在尝试将类型添加到我的StyledComponents(情感反应)。 假设我有一个样式化的按钮组件,当我用泛型StyledComponent声明它的类型时,我需要向它传递3个类型变量: const Button : StyledComponent<Props, InnerProps, Theme> = styled("button")` cssProp:cssVal: ` const按钮:StyledComponent= 样式化(“按钮”)`
const Button : StyledComponent<Props, InnerProps, Theme> =
styled("button")`
cssProp:cssVal:
`
const按钮:StyledComponent=
样式化(“按钮”)`
cssProp:cssVal:
`
道具和内道具有什么区别?InnerProps仅仅是儿童吗 来自
是表示道具类型的类型参数InnerProps
- 内部组件(造型的目标)
是表示额外道具类型的类型参数ExtraProps
- 样式化组件