A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://visgl.github.io/react-google-maps/docs/api-reference/hooks/use-api-is-loaded below:

Website Navigation


useApiIsLoaded Hook | React Google Maps

useApiIsLoaded Hook

React hook to check if the Maps JavaScript API has finished loading.

import {useApiIsLoaded} from '@vis.gl/react-google-maps';

const MyComponent = () => {
const apiIsLoaded = useApiIsLoaded();

useEffect(() => {
if (!apiIsLoaded) return;

// when the maps library is loaded, apiIsLoaded will be true and the API can be
// accessed using the global `google.maps` namespace.
}, [apiIsLoaded]);

// ...
};
Signature

useApiIsLoaded(): boolean

Returns a boolean indicating if the Maps JavaScript API completed loading.

Source

src/hooks/use-api-is-loaded.ts


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4