How to implement scrollTo() function in react #375
Unanswered
mhanifmuhsin
asked this question in
Q&A
Replies: 1 comment 4 replies
-
Are you using react-smooth-scrollbar? this package is recommended if you using use react |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I have a function to call scrollTo (), but that doesn't work, and I get an error, TypeError: scrollbar.scrollTo is not a function
sample code :
const scrollToTop = () => {
scrollbar.scrollTo(0, 100, 600);
};
Beta Was this translation helpful? Give feedback.
All reactions