Building a web site for an auction, we wanted an infinite scroll of lots as many lots where expected.

The web application is a Laravel project with Livewire for the views.

The Livewire Component

The list of lots is a Livewire component:

$count tracks the number of lots to show on the screen.

We render the view with:

Using the computed property,

So we take $count items.

The Blade View

We use Tailwind to construct the view,

Infinite Scroll

Listen on the window scroll event,

The Livewire component has a listener for the loadMore event,

The listener updates the count of lots to be shown, thereby causing a rendering of the view with more ad infinitum.

Open source, Mobile, Web, Cloud, Server - Independent Information Technology and Services Professional

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store