Search code examples
react-nativenavbarfooterbottomnavigationview

How to set a navigation bar in the bottom of a page in react native?


How can we set a Navigation Bar at the bottom of the page in react native using View and components (if you want)!! with any tag of react-native npm - (/or else) you want!!

EX:

The Page Home :

----Header----

   ---- your tags (Screens)---- 

----Footer----

let us to do this -->-->-->


Solution

  • let us use this tag (View) then set styles on it.

    ...

     return (
            <View  style={styles.parantTagStyle}>
                <View>
                    {
                        this.chechreturnedScreen()
                    }
                </View>
    
                <View style={styles.footerTagStyle}>
                    <TabBottom navigatorFunction={this.navPages} headerTitle={this.state.headerTitle} />
                </View>
            </View>
        );
    

    and use this style :

    const styles = StyleSheet.create({
    parantTagStyle: {
        left: 0,
        bottom: 0,
        right: 0,
        flex:1
    
    
    },
    footerTagStyle: {
        position: 'absolute',
        left: 0,
        bottom: 0,
        right: 0,
    
    },
    

    });

    ...