React sensor hook that tracks user's geographic location. This hook accepts position options.
import {useGeolocation} from 'react-use';
const Demo = () => {
const state = useGeolocation();
return (
<pre>
{JSON.stringify(state, null, 2)}
</pre>
);
};
useGeolocation(options: PositionOptions)