I want to display some data from firebase, the problem is that I don't know how to do this after trying many things.
My firebase datbase looks like this:
Now I want to put this data into a calender, so I want only the date from one userID. So I can get only one date, and then use it.
How can I do this?
I now use this:
componentDidMount() {
let userId = firebase.auth().currentUser.uid;
firebase.database().ref('poolog/' + userId ).on('value', (snapshot) => {
this.setState({abc: snapshot.val().childData});
let data = snapshot.val();
let datums = Object.values(data);
this.setState({datums});
});
};
And then I want to render it:
render(){
return(
<View>
<Text>{
this.state.datums
}</Text>
</View>
);
}

console.log(this.state.datums)in your render method?