我正在实现一个按钮,当按下该按钮时,会使用react-native-router-flux。
进入新屏幕import {Scene, Router, Actions} from 'react-native-router-flux';
render() {
<Router>
<Scene key="root">
<Scene key="settings" component={App}/>
</Scene>
</Router>
return (
<View>
<Animated.View style={{position: "absolute", width: "100%", backgroundColor: THEME_COLOR, zIndex: 1}}>
<Header style={{backgroundColor: THEME_COLOR}} hasTabs>
<Body>
<TouchableOpacity onPress={ () => (Actions.settings)} style= {{alignSelf: 'flex-end'}}>
<Text style={{color: "white"}}>
Settings
</Text>
</TouchableOpacity>
<Title>
<Animated.Text style={{color: 'white', fontWeight: "bold"}}>
Messages
</Animated.Text>
</Title>
</Body>
</Header>
</Animated.View>
但是当我点击按钮(atm只显示&#39;设置&#39;的文字)没有任何反应时,我是否错误地实现了路由器组件,或者我调用它是错误的?