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>
        )
    }

  

相关文章:

  • 2021-08-18
  • 2021-08-15
  • 2022-12-23
  • 2021-06-21
  • 2022-12-23
  • 2022-12-23
  • 2022-01-17
  • 2021-10-15
猜你喜欢
  • 2022-12-23
  • 2021-06-19
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-14
  • 2022-12-23
相关资源
相似解决方案