這里我想將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> ) }}
使用 textInput 從用戶獲取值并分配給變量(React-Native)
MM們
2024-01-18 16:05:46