How to bind the value coming from API. I am getting value maharastra from api in react native picker.i.e. state_name: maharashtra, This code is for Add form and Update form
getState(id) { this.setState({ inputCountry: id }) getState(id) .then((responseJson) => { this.setState({ stateData: responseJson }) }) .catch((error) => { setLoaderVisible(false); }); }renderStateList() { return this.state.stateData.map((stateData) => { return <Picker.Item label={stateData.state} value={stateData.state} /> }) }<View style={styles.formRow}><View style={{ flexDirection: 'row' }}><Text style={styles.formText}>{__('Current State')}</Text><Text style={{ fontSize: 15, color: 'red' }}>{__('*')}</Text></View><View style={{ borderBottomWidth: 1.5, borderBottomColor: '#92a1c0' }}><Picker selectedValue={this.state.inputState} value={this.state.inputState} //here i need value maharastra onValueChange={(itemValue, itemIndex) => this.getCity(itemValue) }> {this.renderStateList()}</Picker></View></View>