Skip to content

Latest commit

 

History

History
27 lines (18 loc) · 612 Bytes

useGoogleMap.md

File metadata and controls

27 lines (18 loc) · 612 Bytes

useGoogleMap Hook

React hook to get the Google Maps map instance.

Usage

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

const MyComponent = () => {
  const map = useGoogleMap();

  // Do something with the Google Maps map instance

  return (...);
};

Return value

Returns a Google Maps map instance to use directly. Type: GoogleMapContextType:

google.maps.Map