I'm using the default useLocation hook and not hash based routing, but I have a few use cases where I use the hash in a URL as a potential hint for rendering something. For example, a form component might use #edit when editing mode is enabled, etc. Is there a better option for accessing the hash versus pulling down both useLocation and useHashLocation hooks?
It also doesn't seem like the useHashLocation hook's navigate function allows removing the hash, so I still need to use the useLocation hook's navigate function regardless.
Is there an easier way to handle this, or is the use case not one that's really supported at the moment?
I'm using the default
useLocationhook and not hash based routing, but I have a few use cases where I use the hash in a URL as a potential hint for rendering something. For example, a form component might use#editwhen editing mode is enabled, etc. Is there a better option for accessing the hash versus pulling down bothuseLocationanduseHashLocationhooks?It also doesn't seem like the
useHashLocationhook'snavigatefunction allows removing the hash, so I still need to use theuseLocationhook'snavigatefunction regardless.Is there an easier way to handle this, or is the use case not one that's really supported at the moment?