Quickstart
A quick dive into getting started with Lore
A quick dive into getting started with Lore
In this section we'll replace the pagination links with an infinite scrolling approach.
At the end of this section your application will look like this:
Infinite Scrolling differs from pagination in the following ways:
It's important to point out that these are view specific concerns, meaning nothing about creating the experience requires changes to infrastructure or to the API. These needs are all related to how a user interacts with data, and have nothing to do with how data is fetched or stored.
There's a lot of boilerplate associated with Infinite Scrolling, but it breaks down into two main components:
List
that can keep track of all the pages of data, and merges them into a single array. This component also needs to know how to render each item in the array.Button
that the user can press to load the next page of data, which means it also needs to know when there is a next page.Our strategy will be to create those two components first, and then use them to convert our Feed into an Infinite Scrolling experience.
Ready? Let's get started!