-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Closed
Description
Which project does this relate to?
Router
Describe the bug
useLocation().hash doesn't include leading #
Your Example Website or App
https://stackblitz.com/edit/tanstack-router-ml6mqcym?file=src%2Froutes%2Fechohash.tsx&preset=node
Steps to Reproduce the Bug or Issue
- https://stackblitz.com/edit/tanstack-router-ml6mqcym?file=src%2Froutes%2Fechohash.tsx&preset=node
- navigate to /echohash#123
Expected behavior
the docs say:
/**
* The hash of the location, including the leading hash character.
*/
hash: string;so the shown text is supposed to be #123
it is also the behavior defined by WHATWG URL spec
Screenshots or Videos
No response
Platform
- Router / Start Version: 1.160.2
- OS: MacOS
- Browser: Chrome
- Browser Version: 144.0.7559.133
Additional context
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels