Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
1 contributor

Users who have contributed to this file

23 lines (15 sloc) 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>
  );
};
You can’t perform that action at this time.