Hooks

useGeolocation

Publisher

cermuel

50 hooks published

More from this publisher

useGeolocation

Manage location, errors, and permission state.

useGeolocation.tsx
import { useGeolocation } from "@cermuel/hooks/react";export function useGeolocationExample() {  const location = useGeolocation();  return <p>{location.supported ? location.permission : "Unsupported"}</p>;}

Props

Param
Type
Default Value
options?
PositionOptions

Returns

GeolocationSnapshot