【发布时间】:2021-11-21 06:02:26
【问题描述】:
我正在尝试使用
组件“输入”的视图配置 getter 回调必须是一个函数(收到“未定义”)。确保以大写字母开头的组件名称
代码如下:
export default function App() {
return(
<View style={styles.container}>
<View style={styles.header}>
<TextInput />
</View>
</View>
);
}
const styles = StyleSheet.create({
container: {
flex: 1,
marginTop: StatusBar.currentHeight,
backgroundColor: "#F7F7F7FF",
paddingTop: StatusBar.currentHeight,
alignItems: "center",
justifyContent: "center"
},
header: {
backgroundColor: "pink",
padding: 20,
},
});
只有当我使用
【问题讨论】:
-
你为什么不使用 "react-native" 或 "react-native-elements" 中的
? -
@Chilarai 我现在正在使用“react-native”????。我的 IDE 默认从“react-native-web”自动导入组件。
标签: javascript reactjs react-native expo