I have a UI problem to solve in React. When the user start scroll, will add a background class to the header. When scrolling to the top of the page, header background disappear.
I have figure out how to add the background while scrolling and modify the state, but how to detect whenever user scroll to the top of the page?