createStackNavigation invariant violation element type is invalid expected a string

后端 未结 2 1006
谎友^
谎友^ 2021-01-27 21:13

Upon creating importing and using createStackNavigation I\'m getting the following error. Any help would be greatly appreciated! Also, this is my first app in react-native so pl

2条回答
  •  不要未来只要你来
    2021-01-27 21:40

    Its the problem with 'export default' and import with {} or without {}.

    Change this line

    import { MainNavigation } from '../screens/MainNavigator';
    

    to (remove the curly brackets)

    import  MainNavigation  from '../screens/MainNavigator';
    

提交回复
热议问题