Invariant Violation: The navigation prop is missing for this navigator

后端 未结 10 2581
佛祖请我去吃肉
佛祖请我去吃肉 2020-11-30 23:20

I am receiving this message when I tried starting my react native app. Usually this kind of format works on other multi screen navigation yet somehow does not work in this c

10条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-01 00:03

    I had the code at the bottom

    export default class App extends React.Component {
      render() {
        return (
          
            
          
        );
      }
    }
    

    I simply replaced it with and it worked like a charm. Definitely, it's because updates in react-navigation library:

    const App = createAppContainer(SimpleApp);
    export default App;
    

    Also, I included createAppContainer library into react-navigation at the top as well.

提交回复
热议问题