Skip to content

Latest commit

 

History

History
6 lines (5 loc) · 416 Bytes

README.md

File metadata and controls

6 lines (5 loc) · 416 Bytes

"# useHash-react-hook"

Use the useState() hook to lazily get the hash property of the Location object. Use the useCallback() hook to create a handler that updates the state. Use the useEffect() hook to add a listener for the 'hashchange' event when mounting and clean it up when unmounting. Use the useCallback() hook to create a function that updates the hash property of the Location object with the given value.