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-loading-status below:

Website Navigation


useApiLoadingStatus Hook | React Google Maps

useApiLoadingStatus Hook

React hook to get the current status of the API Loader. This can be used to react to loading-errors.

import {useApiLoadingStatus, APILoadingStatus} from '@vis.gl/react-google-maps';

const MyComponent = () => {
const status = useApiLoadingStatus();

useEffect(() => {
if (status === APILoadingStatus.FAILED) {
console.log(':(');

return;
}
}, [status]);

// ...
};
Signature

useApiLoadingStatus(): APILoadingStatus

Returns the current loading-state.

Source

src/hooks/use-api-loading-status.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