Answer the question
In order to leave comments, you need to log in
How to scroll to an element after routing in ReactJS?
Found only solution without routing.
Answer the question
In order to leave comments, you need to log in
As well as without routing, as in normal js, with routing, exactly the same mount of components occurs.
You can use refs and the like however you like.
1. yourDOMElement.scrollIntoView();
2.
window.scrollBy(yourDOMElement.getBoundingClientRect().top);
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question