|
Download react-use/docs/useLocation.md from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 368 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/react-use/docs/useLocation.md
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/react-use/docs/useLocation.md
-
curl -L -o useLocation.md https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/react-use/docs/useLocation.md
368 Bytes
useLocation
React sensor hook that tracks brower's location.
For Internet Explorer you need to install a polyfill.
Usage
import {useLocation} from 'react-use';
const Demo = () => {
const state = useLocation();
return (
<pre>
{JSON.stringify(state, null, 2)}
</pre>
);
};