T
TanStack3y ago
rising-crimson

How do you link to a specific section of a page?

I tried the hash prop like https://tanstack.com/router/v1/docs/guide/navigation#hash-links, but it doesn't work; it goes to the page, but not to the specified section.
<Link to="/">Home Page</Link>
<Link to="/" hash="project">
Home#Project
</Link>
<Link to="/another">Another Page</Link>
<Link to="/">Home Page</Link>
<Link to="/" hash="project">
Home#Project
</Link>
<Link to="/another">Another Page</Link>
I replicate the issue in glitch: https://glitch.com/edit/#!/silken-chill-jasper?path=src%2FNavbar.jsx%3A6%3A20. Thanks
1 Reply
afraid-scarlet
afraid-scarlet3y ago
I also didn't find how to implement this with Link. I thought that this should be implemented under the hood of the library, but unfortunately it does not work

Did you find this page helpful?