export default class Send extends Component{
constructor(props)
{
super(props);
const ds = new ListView.DataSource({rowHasChanged: (r1, r2) => r1 !== r2});
this.state = {
userDataSource: ds,
isLoading: true,
PickerValueHolder : '',
amount:'',
RxAmount:'',
exchange:'',
input1:'',
recRate:[{},{},{}]
}
}
fetchUsers(){
fetch('https://trs.php?some parameters')
.then((response) => response.json())
.then((response) => {
console.log(response)
this.setState({
userDataSource: this.state.userDataSource.cloneWithRows(response),
});
});
}
renderRow(user , sectionId, rowId, highlightRow,key){
return(
<View style={styles.row}>
<Text style={styles.rowText}> Rate {user[0].Rate}</Text>
</View>
); }
<ListView
dataSource={this.state.userDataSource}
renderRow={this.renderRow.bind(this)}
/>
i want to access the rate highlighted in yellow
I am new to react native so i want to access an array of objects and get only one particular value which is highlighted in yellow and i don't know how i can do it ?
Thanks