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.
Sourcesrc/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