React-Native Navigator-this.props.navigation....


render() {
        return (
            <View>
                <Text>2</Text>
                <Button
                    title = "跳转到指定的页面"
                    onPress = {() => this.props.navigation.push('Profile')}
                />
                <Button
                    title = "跳转到指定的页面"
                    onPress = {() => this.props.navigation.navigate('Home')}
                />
                <Button
                    title = "返回上一个页面"
                    onPress = {() => this.props.navigation.goBack()}
                />

                <Button
                    title = "返回第一个页面"
                    onPress = {() => this.props.navigation.popToTop()}
                />
            </View>
        )
    }

  


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM