File size: 368 Bytes
1e92f2d |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
# `useLocation`
React sensor hook that tracks brower's location.
For Internet Explorer you need to [install a polyfill](https://github.com/streamich/react-use/issues/73).
## Usage
```jsx
import {useLocation} from 'react-use';
const Demo = () => {
const state = useLocation();
return (
<pre>
{JSON.stringify(state, null, 2)}
</pre>
);
};
```
|