I'm building a react app and I have a few on page anchors. I've made divs with the proper IDs and the traditional anchor tag with a hash matching those IDs.
How can I find the same div ID when I click on the anchor with the matching hash? Right now I'm using the event to pass into my onClick function.
<a>supposed to do? Scroll to the div? This sounds like an XY problem.