react-on-screen
react-on-screen copied to clipboard
Allow passing prop to change tag to listen for scroll
Hi
Love the component been using it a bunch. I just refactored my website to handle parallax scrolling with translateZ and perspective. This scrambled a bunch of stuff for example a fixed header within the body layout. So I needed to move the overflow scroll property from body to a child tag.
Now the visibility component doesn't work since it only listens to window scroll or document scroll.
I started this pull request
https://github.com/fkhadra/react-on-screen/pulls
I change the .gitignore to refrence the repo in my package.json.
Essentially I just passed in the id of the new scrolling element to listen to and search it with getElementById