T
TanStack4y ago
other-emerald

How to handle anchors via router

I'm looking for an ability to handle anchors via router. For example I have 2 routes '/home', '/news'. Also there is a global nav menu to navigate throw this pages. In both I have some components, and this components have anchors. In menu users can navigate to this blocks via this anchors. So the question is. How to support it via router. As I understood, there isn't native support. I need to handle selected anchors via params and scrollIntoView them by myself?
1 Reply
vicious-gold
vicious-gold4y ago
All of the navigational apis support the hash option

Did you find this page helpful?