我需要更改渲染函数并在给定特定状态时运行一些子渲染函数,
例如:
render() {
return (
<View style={styles.container}>
if (this.state == 'news'){
return (
<Text>data</Text>
)
}
</View>
)
}
Run Code Online (Sandbox Code Playgroud)
如何在不改变场景的情况下实现它,我将使用选项卡动态更改内容.