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