Ruby on Rails #69 Frames + Streams: Infinite Scroll Pagination (Best approach)

01/04/2022 (about 2 years ago)

In the last 2 episodes we implemented Infinite Scroll Pagination with Frames and Streams separately.

In this episode we will combine Frames + Streams to create an event simpler way to add Infinite Scroll to a Rails 7 app with Hotwire.

Episode source code:

Pagy Countless:

Thanks to for showing me this solution!

0:00 Previous approaches
0:50 Scaffold and seed Artists
1:25 Paginate Artists
2:05 Turbo Frame responds to Turbo Stream
5:15 WORKS!
5:30 Stop scrolling if no more pages
6:32 Summary
7:02 Pagy Countless

Sign in to join the conversation