Read and set the hash of the URL and keep it updated.
This is custom React hooks, you need to follow the Basic Rules when you use it.
Change the hash and the value follows.
const useHash = () => [string, (value: string) => void]