我无法输入文字。我正在使用expo应用程序,输入框只是没有出现在屏幕上。我的代码中有错误吗?
import React, { Component } from 'react';
import { Text, View, TextInput } from 'react-native';
export default class App extends Component {
constructor(props) {
super(props);
this.state = {text: ''}
}
render() {
return (
<View>
<Text>Open up App.js to start working on your app!</Text>
<TextInput
onChangeText={(text) => this.setState({text})}
value={this.state.text}
label="Plan Name"
/>
</View>
);
}
}