title: Render/retrieve data from firebase database in react native
body: <p><a href="https://i.stack.imgur.com/JeFgu.jpg" rel="nofollow noreferrer">the screenshot of the realtime database</a>I created <code>name</code> and <code>age</code> in the database already using the <code>set</code> function. I want to render and retrieve data from firebase real time database in react native instead of Here word in the components. How do I achieve that?</p>
  
  <pre><code>import React, {Component} from 'react';
  import {Platform, StyleSheet, Text, View,Image,Button,TouchableOpacity} from 'react-native';
  //import  firebase from '@firebase/app';
  //import '@firebase/auth';
  //import '@firebase/database';
  import firebase from 'firebase';    
  
   export default class App extends Component{  
   componentWillMount(){  
    var config = {
        apiKey: "**********",
        authDomain: "**********.firebaseapp.com",
        databaseURL: "https://********.firebaseio.com",
        projectId: "*******",
        storageBucket: "********.appspot.com",
        messagingSenderId: "*********"
      };
  firebase.initializeApp(config);    
  firebase.database().ref('users/001').set(  
  {  
  name:'noor adam',
  age:45  
   }).then(()=&gt;{console.log('inserted');}).catch((error)=&gt; . 
   {console.log('error');}); 
  }  
  render(){ 
  return(  
  &lt;View&gt;&lt;Text&gt;Here&lt;/Text&gt;&lt;/View&gt;
     )  
   }  
  }
  </code></pre>
  
  <p>Instead of the Here word in the render, i want to retrieve the name and the age from the firebase database.</p>