I am getting values in console but not able to show in drop down See this link
Can anybody explain what im doing wrong here
return firebase.database().ref('Users/Trainers/').on('value', (snapshot) => {
snapshot.forEach(function(childSnapshot){
// var childKey= childSnapshot.key;
var childData= childSnapshot.val();
var childEmail = childData.email;
var childfirstName = childData.firstName;
var childlastName = childData.lastName;
var childTrainers = childfirstName + ' ' + childlastName + ' ' + childEmail;
console.log(childTrainers);
})
})
}
async componentDidMount(){
this.getlist();
}
State
childTrainers: []
And in render method,
<Select options={this.state.childTrainers} />