Reputation: 1205
I have an React application that uses hash history, but the problem is, the application currently has anchor tags with ID references so it can scroll to the specific ID. How can I make a scroll animation without using the Anchor tag and scroll to a specified ID?
Upvotes: 0
Views: 1154
Reputation: 5516
You can use plain JavaScript - CodePen Demo
JQuery's animate()
function is much less verbose when it comes to scrolling, but I understand if you don't want to import JQuery into a React project.
Upvotes: 1