I am creating a basic React Native app for my class and I ran into a problem. I am trying to implement the Stack Navigation in my view, but it is not showing the blue stack buttons for some reason. Is it possible to do it this way ?
import React,{Component} from 'react';
import {View, Text, StyleSheet, Image} from 'react-native';
import { createStackNavigator } from '@react-navigation/stack';
import Home from '../views/Home.js'
let stack = createStackNavigator();
class Account extends Component{
render(){
return(
<View style = {styles.container} >
<Text style = {styles.PageHeader}>TRENDZ</Text>
<Text style = {styles.PageSubHeader}> Online Store</Text>
<Image style = {styles.AccImage} source={require('../../assets/login/login.jpg')} {...this.props} />
<stack.Navigator>
<stack.Screen name = 'Home' component = {Home} />
</stack.Navigator>
</View>
)
}
}
const styles = StyleSheet.create({
container: {
marginTop: 20,
},
AccImage: {
height:600,
width: null
},
PageHeader: {
fontWeight: 'bold',
fontSize: 70,
textAlign: 'center',
color: 'orange'
},
PageSubHeader: {
textAlign: 'center',
fontSize: 25,
paddingBottom: 20
}
})
export default Account;