can someone please explain what's the meaning of waypoint.below
Closed this issue · 1 comments
dmcshehan commented
onEnter({previousPosition, currentPosition}){
if(previousPosition === Waypoint.below){
this.setState({
isInView : true
});
}
}`
I have this code and I'm trying to understand...
previousPosition === Waypoint.below
this part. When I log it to the console, it just prints 'below' any explanations, please? Thanks
trotzig commented
When the waypoint is below the visible portion of the page and you scroll down so that the waypoint is now visible, then onEnter will be called with previousPosition === ’below’. Waypoint.below is a constant you can use in order to avoid using the string ”below”.