1
我刚开始学习React Native,我试图在世博会上做RN。现在我收到这个错误。React.createElement:类型在世博会上无效
Warning: React.createElement: type is invalid -- expected a string (for
built-in components) or a class/function (for composite components)
but got: object. You likely forgot to export your component from the
file it's defined in.
我的代码是
import React from 'react';
import {Text, AppRegistry} from 'react-native';
const App =() => (
<Text>Some Text </Text>
);
AppRegistry.registerComponent('helloworld',() => App);
我又写道在App.js这个鳕鱼文件
我写的代码是错了?我实际上是从教程中获取了这些代码。 –
从哪个教程? –
https://www.udemy.com/the-complete-react-native-and-redux-course/?altsc=610300 –