title: React: Google Places API/ Places Details
body: <p>I have the following code which retrieves Google Places Reviews based on Google Places API. I have incorporated the logic to work as a React life cycle component. Currently, I am unable to setState and correctly bind the object. I could use some help understanding where my logic is failing.</p>
  
  <pre><code>export default class Reviews extends React.Component{
  constructor(props){
      super(props);
      this.state = {
        places: []
      }
    }
  
  
  componentDidMount(){
  
  
  let map = new google.maps.Map(document.getElementById("map"), {
      center: {lat:40.7575285, lng: -73.9884469}
    });
  
    let service = new google.maps.places.PlacesService(map);
  
  service.getDetails({
      placeId: 'ChIJAUKRDWz2wokRxngAavG2TD8'
    }, function(place, status) {
      if (status === google.maps.places.PlacesServiceStatus.OK) {
        console.log(place.reviews);
        // Intended behavior is to set this.setState({places.place.reviews})
      }
    })
  }
  render(){
  const { places } = this.state;
  return(
    &lt;div&gt;
      &lt;p&gt;
        {
          places.map((place) =&gt; {
            return &lt;p&gt;{place.author_name}{place.rating}{place.text}&lt;/p&gt;
          })
        }
      &lt;/p&gt;
    &lt;/div&gt;
    )
   }
  }
  </code></pre>