Skip to content

Tracks the browser's location hash value, and allows changing it.

Notifications You must be signed in to change notification settings

aozoragh/useHash-react-hook

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

"# 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.

About

Tracks the browser's location hash value, and allows changing it.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published