undefined is not an object (evaluating 'navigation.navigate')

前端 未结 1 915
Happy的楠姐
Happy的楠姐 2021-01-17 08:14

I am trying to navigate from one screen to other screen inside tabbar in react native. But, I am getting following error

  ButtonClickCheckFunction = () =>         


        
相关标签:
1条回答
  • 2021-01-17 08:36

    If you post more code, we'll be able to better answer your question.

    From the error message though, it seems like you're not properly creating the component so that the navigation property is set. You'll need to make sure to wrap the component using the withNavigation higher order component.

    export default withNavigation(MyComponent);
    
    0 讨论(0)
提交回复
热议问题