react-waypoint
react-waypoint copied to clipboard
Waypoint to react custom component
<Waypoint onEnter={() => alert("cest parfait")} onLeave={() => alert("cest parfait")} > <div> <SkillsContainer ref={input => (this.skillsContainer = input)} /> </div> </Waypoint>
My waypoint is on the top of my page but my component SkillValue is at the middle. My alert dialog is executing when my layout is appear, why ? :)
Waypoints normally fire when you scroll to them, but they also fire on component mount, if they are in view. There's a section in the readme about this: https://github.com/brigade/react-waypoint#usage
@meridj did you solve your issue?