Skip to content

Latest commit

 

History

History
26 lines (17 loc) · 607 Bytes

useGeocodingService.md

File metadata and controls

26 lines (17 loc) · 607 Bytes

useGeocodingService Hook

React hook to use the Google Maps Geocoding Service in any component.

Usage

import React from 'react';
import {useGeocodingService} from '@ubilabs/google-maps-react-hooks';

const MyComponent = () => {
  const geocoder = useGeocodingService();

  // Do something with the geocoder

  return (...);
};

Return value

Returns a Geocoder instance to use directly.

google.maps.Geocoder