Infinite Scrolling with Hotwire

Episode #338 by Teacher's Avatar David Kimura

Summary

In this episode, we have a look at two different approaches for implementing an infinite scrolling feature within a Ruby on Rails application with Hotwire. The first method will use a Stimulus Controller to handle AJAX requests back to the Rails application. The second approach will not use any external library, other than Hotwire, nor any javascript to accomplish the infinite scrolling.
rails hotwire javascript turbo 17:47
Student & Teacher
$ 9 /mo

Valid School Email Required

Same Access as Pro

Subscribe Now
Pro Monthly
$ 19 /mo

Access to Pro Episodes

Invite to Slack Channel

Priority Suggestions

Ad Free

Subscribe Now
Pro Annual
Autumn Sale
$ 144 190 /yr

Access to Pro Episodes

Invite to Slack Channel

Priority Suggestions

Ad Free

Subscribe Now
Teams
$ 57 /mo

3 Users Minimum

$19.00 / user / month

Same Access as Pro

Subscribe to Teams