React hook to use the Google Maps Geocoding Service in any component.
import React from 'react';
import {useGeocodingService} from '@ubilabs/google-maps-react-hooks';
const MyComponent = () => {
const geocoder = useGeocodingService();
// Do something with the geocoder
return (...);
};
Returns a Geocoder
instance to use directly.
google.maps.Geocoder