Answer the question
In order to leave comments, you need to log in
How in React when scrolling, change the css class properties?
It is necessary in React to reduce the size of the header when scrolling down and, accordingly, when scrolling to the end to the top, restore the reverse css values \u200b\u200bof a certain class. And can this be done with the react-scroll library?
Answer the question
In order to leave comments, you need to log in
There are many scroll libraries on github. When you scroll to a certain point, just add a class to the element or change the inline style. I don’t remember exactly, but it seems that react-scroll has a scroll hook to the element (div). Read the documentation
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question