ooade / pimg

:camera: Mini Image Lazy Loader for P(R)eact and Vue
https://pimg.surge.sh
MIT License
99 stars 11 forks source link

Add Waypoint #11

Closed ooade closed 6 years ago

ooade commented 6 years ago

Our implementation on ScrollToView is not cool enough, we need something a little bit powerful. We'd need to add react-waypoint as a dev-dependency and ask user to install it if needed. I'm not sure how we can pull this off easily :sweat_smile:

luqmanoop commented 6 years ago

any reason why u want this as a dev-dependency? I mean, if scrollToReveal is not cool enough can't we just add react-waypoint as a dependency?

ooade commented 6 years ago

Eliminating Unused Code: Because not everyone will need this feature. For example, Facebook and Twitter don't use the ScrollToView feature but Medium uses.

ooade commented 6 years ago

I Stumbled on the Intersection Observer API as I was surfing the net today. Matches our use cases.