useGeolocation
Track the current geolocation of the client using the Geolocation (opens in a new tab) API.
Loading...
Type Definitions
type GeolocationState = Partial<GeolocationCoordinates> & {
isLoading: boolean;
timestamp?: number;
error?: GeolocationPositionError;
};
const useGeolocation: (options?: PositionOptions) => GeolocationState;