mlandauer / thats-camping-elm

Find campsites near you
https://thatscamping.org
GNU General Public License v3.0
5 stars 1 forks source link

On long campsite list dynamically load more campsites as we scroll #110

Open mlandauer opened 7 years ago

mlandauer commented 7 years ago

This allow us to start with a much smaller DOM which will render much more quickly. In a quick test with lighthouse by just showing the first 10 campsites on the list we went from a "First meaningful paint" of 7085.3ms to 872.2ms.

So, let's only add to the campsite list in the DOM when we actually scroll down.

mlandauer commented 7 years ago

Here's an example of how you could implement it in pure elm http://stackoverflow.com/questions/40690998/how-to-implement-infinite-scroll-in-elm