title: How to use google reverse geocoding with react native Expo?
body: <p>I want to put in my application a button that when pressed return the current address of the cell phone.</p>
  
  <p>The latitude and longitude I am able to return correctly, and to convert this data into an address I got to the <a href="https://github.com/devfd/react-native-geocoder#install" rel="noreferrer">react-native-geocoder</a> library.</p>
  
  <p>My current code looks like this:</p>
  
  <pre><code>import React, { Component } from 'react';
  import { View, Text, Button } from 'react-native';
  import Geocoder from 'react-native-geocoder';
   // 0.4.8
  
  class GeolocationExample extends Component {
    constructor(props) {
      super(props);
  
      this.state = {
        latitude: null,
        longitude: null,
        error: null,
      };
    }
  
    refresh = () =&gt; {
      navigator.geolocation.getCurrentPosition(
        (position) =&gt; {
          this.setState({
            latitude: position.coords.latitude,
            longitude: position.coords.longitude,
            error: null,
          });
        },
        (error) =&gt; this.setState({ error: error.message }),
        { enableHighAccuracy: true, timeout: 20000, maximumAge: 1000 },
      );
    };
  
    render() {
      Geocoder.geocodePosition(this.state.latitude,this.state.longitude)
      return (
        &lt;View style={{ flexGrow: 1, alignItems: 'center', justifyContent: 'center' }}&gt;
          &lt;Text&gt;Latitude: {this.state.latitude}&lt;/Text&gt;
          &lt;Text&gt;Longitude: {this.state.longitude}&lt;/Text&gt;
  
          {this.state.error ? &lt;Text&gt;Error: {this.state.error}&lt;/Text&gt; : null}
           &lt;Button
            style={{ marginTop: 30 }}
            onPress={() =&gt; { this.refresh(); }}
            title="Refresh"
          /&gt;
        &lt;/View&gt;
      );
    }
  }
  
  export default GeolocationExample;
  </code></pre>
  
  <p>From what I understood in <code>Geocoder.geocodePosition(this.state.latitude,this.state.longitude)</code> would be returning the address, but I did not understand how to get this data from there.</p>
  
  <p>The code in the Snack: <a href="https://snack.expo.io/rJhYwaG2Z" rel="noreferrer">https://snack.expo.io/rJhYwaG2Z</a></p>