用户输入的数据数据不会显示在反应原生材料文本字段中
this.state = {
userName: ''
}
render() {
let { userName } = this.state;
return (
<View style={{ flex: 1, justifyContent: 'center', alignItems: 'center' }}>
<TextField style={{ color: 'black', marginLeft: windowSize.width / 1.4, color: 'red' }}
label='Phone number'
textColor={'red'}
value={userName}
labelHeight={40}
labelPadding={1}
Bottom padding={8}
onChangeText={(userName) => this.setState({ userName })}
/>