|
Download react-use/docs/useGeolocation.md from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 442 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/react-use/docs/useGeolocation.md
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/react-use/docs/useGeolocation.md
-
curl -L -o useGeolocation.md https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/react-use/docs/useGeolocation.md
442 Bytes
useGeolocation
React sensor hook that tracks user's geographic location. This hook accepts position options.
Usage
import {useGeolocation} from 'react-use';
const Demo = () => {
const state = useGeolocation();
return (
<pre>
{JSON.stringify(state, null, 2)}
</pre>
);
};
Reference
useGeolocation(options: PositionOptions)