我的代码是
import React from 'react';
import { Text, StyleSheet, View } from 'react-native';
const ComponentsScreen = () => {
return {
<View>
<Text style={styles.testStyle}>This is the components screen</Text>
</View>
};
};
const styles = StyleSheet.create({
testStyle: {
fontSize: 30
}
});
export default ComponentsScreen;
Run Code Online (Sandbox Code Playgroud)
我收到一个错误,显示在我的开始视图标记处预期有属性分配,在我的结束视图标记和关闭 ComponentsScreen 的括号处预期出现声明或语句错误,在结束我的 return 语句的括号处预期有表达式。有什么解决办法吗?
react-native ×1