use-hash
Get and set hash value in the URL
Source
Docs
PackageIcon
Usage
The use-hash hook returns the hash from the URL, subscribes to its changes with the hashchange event,
and allows you to change it with the setHash function:
Current hash:
Initial state value
By default, use-hash will retrieve the value in useEffect. If you want to get the initial value
as soon as the hook is called, set getInitialValueInEffect to false. Note that this option is
not compatible with server-side rendering – you can only use it if your app is client-side only.
Definition
Exported types
The UseHashOptions and UseHashReturnValue types are exported from @mantine/hooks;
you can import them in your application: