I think you don't need to use a third party library. First you, you need to embed the script in your index.html
<script src="https://maps.googleapis.com/maps/api/js?key=[YOUR_API_KEY]&libraries=places"></script>
Create a component for your autocomplete input element.
Inside this components componentDidMount method
this.autocomplete = new google.maps.places.Autocomplete(
this.autocompleteInput.current,
{
types: ["geocode"],
componentRestrictions: { country: "uk" }
}
);
this.autocomplete.addListener("place_changed", this.handlePlaceChanged);
Autocomplete class has an event called place_changed. When you click on one of the results, you can trigger autocomplete classes getPlace() function and fetch coordinates and bunch of other fields.
handlePlaceChanged() {
const place = this.autocomplete.getPlace();
this.props.onPlaceChanged(place);
}