“未定义不是函数”错误。为什么不工作?

时间:2019-01-10 20:23:26

标签: react-native

 import React from "react"; import {StackNavigator} from "react-navigation"; import StartScreen from "../screens/start";


 export default StackNavigator( {   Start: {
     screen: StartScreen   } }, {   initialRouteName:"Start",   navigationOptions:{
     headerSryle:{
       backgroundColor:"#f4511e"
     },
     headerTitleStyle:{
       textAlign:"center",
       alignSelf:"center",
       fontSize:20,
       color:"#fff",
       fontWeight:"bold"
     }   }  } )

phone screenshot showing error

1 个答案:

答案 0 :(得分:0)

您应该编写类似的内容:

const HomeStack = StackNavigator({ ...

然后

export default HomeStack;