Pagination and Infinite Scroll in Phoenix

Photo by Olga Tutunaru on Unsplash

What is Pagination?

What is Infinite Scroll?

How Do We Code This In Phoenix?

How Do You Paginate an Ecto Query?

How Do You Handle a load-more Event In Phoenix Liveview?

How Do You Trigger The Load More Event?

Final Thoughts.

  • Infinite Scrolling
  • Loading more entries vs loading next entries and removing previous entries.
  • Implementing pagination with Ecto queries
  • Creating a load-more event to load more entries and attach them to the current data set.
  • Triggering the load more event when the user scrolls down using phoenix hooks.

--

--

--

Software Engineer. I create educational content focused on technology for mobile and web applications.

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Skills We Can Learn From Software Engineers And Apply In Our Life Today

Working With Akka Quartz Scheduler

Python — 4

Tachyon Protocol Weekly Report #27

Vision behind the HUMAN ambassador program

Tutorial: Write The Sims 4 Script Mod with Python — Part 1: Introduction

MongoDB server online? Nice work, now here’s a few useful commands

Best Python IDEs in 2021

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
Brooklin Myers

Brooklin Myers

Software Engineer. I create educational content focused on technology for mobile and web applications.

More from Medium

Rendering Template in Phoenix LiveView

Using Ecto changesets for JSON API request body validation.

Elixir OTP and CockroachDB

In Phoenix, how does the router, controller, template, and view code work together to render…