0
我试图编译反应本地项目。该文件的代码中的错误是:必须返回有效的react元素(或null)。您不仅如此已返回undefined,数组或其他一些无效的对象(阵营母语)
import React from 'react';
import {Text,View} from 'react-native';
const Header =() =>
{
const {textStyle} =styles;
return
(
<View>
<Text style={textStyle}>Albums!</Text>
</View>
);
};
const styles = {
textStyle:{
fontSize:20
}
};
export default Header;
是的,它的工作! –