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

前端 未结 13 1718
说谎
说谎 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:33

    i had the same problem when i was using the header component

    now you can use the navigation variable in other component like this

     { this.props.navigation.navigate("Play");}}>
    

    Happy Codding :)

提交回复
热议问题