Здесь я хочу присвоить данные из textInput переменной a. Как мне это сделать? (То есть, когда пользователь вводит данные в textInput, я хочу присвоить их переменной a.)
import React, { Component } from 'react'
import { Text, View, TextInput} from 'react-native'
export default class deneme1 extends Component {
constructor(props) {
super(props);
this.state = {
a:"",
};
}
render() {
return (
<View>
<View style = {styles.textinput}>
<TextInput
placeholderTextColor='white'
style = {styles.textinputtext}
/>
</View>
</View>
)
}
}


![Безумие обратных вызовов в javascript [JS]](https://i.imgur.com/WsjO6zJb.png)


Вы можете попробовать этот
<TextInput
placeholder = {"A Variable"}
onChangeText = {(text) => this.setState({a: text}) }
value = {this.state.a}
/>