【发布时间】:2021-11-08 02:18:55
【问题描述】:
在我的示例中,我尝试从以下代码创建一个名为 nextButton 的组件,然后我可以使用它。
我做的问题出在哪里?
export const MainScreen = () => {
const nextButton =() => {
return (
<TouchableOpacity
style={{ alignSelf: 'center' }}
onPress={() => verifyNavigate()}
>
<LinearGradient
colors={[Colors.Grayish_blue,
Colors.Oval_blue,
Colors.Dark_blue]}
style={styles.linearGradientStyle}
>
<Text
style={styles.nextText}>next</Text>
</LinearGradient>
</TouchableOpacity>
)
}
return (
<nextButton />
)
}
【问题讨论】:
-
您能否详细说明您的问题,提供更多详细信息以及错误日志(如果有)?
-
我编辑我的问题。
标签: javascript reactjs react-native components jsx