当我在iPhone Expo上运行react-native 应用程序时,此错误显示在红色背景区域.
不变冲突:元素类型无效:应为字符串(对于内置组件)
这是应用程序."src/components/"文件夹中的js
import React, { Component } from 'react';
import { View, Text } from 'react-native';
export default class App extends Component {
render() {
return (
<View>
<Text>Hello</Text>
</View>
);
}
}
这是主应用程序.js位于react native app文件夹中.
import App from './src/components/App';
我使用expo应用程序运行此代码.我如何解决这个错误?