PHP技术,PHP研究及学习,Python学习,人工智能,大数据服务

PHP+Python » APP开发 » undefined is not a function '(0, _reactNavigation.StackNavigator)' is undefined)

undefined is not a function '(0, _reactNavigation.StackNavigator)' is undefined)

此文被围观173日期: 2019-04-21 分类 : APP开发  标签:  ···

_reactNavigation.StackNavigator报错,

解决方法如下:

Possibly outdated: “Stack Navigator"
use "createStackNavigator" 

for example :


import React from "react";
import { View, Text } from "react-native";
import { createStackNavigator, createAppContainer } from "react-navigation";

class HomeScreen extends React.Component {
  render() {
    return (
      <View style={{ flex: 1, alignItems: "center", justifyContent: "center" }}>
        <Text>Home Screen</Text>
      </View>
    );
  }
}

const AppNavigator = createStackNavigator({
  Home: {
    screen: HomeScreen
  }
});

export default createAppContainer(AppNavigator);



参考来源:https://stackoverflow.com/questions/53531170/undefined-is-not-a-function-0-reactnavigation-stacknavigator-is-undefined

本站使用ThinkPHP框架开发读图网主题,目前托管在阿里云,图片由读图网提供. 蜀ICP备12031064号

Copyright © 2011-2019adophper.com All Rights Reserved.