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