Getting undefined is not an object evaluating _this.props.navigation

前端 未结 13 1699
说谎
说谎 2020-12-14 15:19

I\'m using DrawerNavigator and I have 3 pages: Router page, mainScreen and a photos page,
I maked a header navbar are

13条回答
  •  一整个雨季
    2020-12-14 15:55

    class ProductScreen extends Component {

    export default ProductScreen; // make sure bottom this line mention

    Call this

       this.props.navigation.navigate('ProductAddScreen')}
            activeOpacity={0.7} style={styles.button}>
    
           {this.state.notFound} 
    
      
    

提交回复
热议问题