Endless Scroll / Infinite Loading with Turbo Streams & Stimulus

This page summarizes the projects mentioned and recommended in the original post on dev.to

SurveyJS - Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App
With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.
surveyjs.io
featured
InfluxDB - Power Real-Time Data Analytics at Scale
Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
www.influxdata.com
featured
  • turbo

    The speed of a single-page web application without having to write any JavaScript (by hotwired)

  • Hotwire Turbo by the Ruby on Rails developers is the new solution to enhance server side rendered apps with interactive behavior without much Javascript at all.

  • IntersectionObserver

    Intersection Observer

  • // app/javascript/controllers/infinite_scoll_controller.js import { Controller } from "stimulus" export default class extends Controller { static targets = ["scrollArea", "pagination"] connect() { this.createObserver() } createObserver() { const observer = new IntersectionObserver( entries => this.handleIntersect(entries), { // https://github.com/w3c/IntersectionObserver/issues/124#issuecomment-476026505 threshold: [0, 1.0], } ) observer.observe(this.scrollAreaTarget) } handleIntersect(entries) { entries.forEach(entry => { if (entry.isIntersecting) { this.loadMore() } }) } loadMore() { const next = this.paginationTarget.querySelector("[rel=next]") if (!next) { return } const href = next.href fetch(href, { headers: { Accept: "text/vnd.turbo-stream.html", }, }) .then(r => r.text()) .then(html => Turbo.renderStreamMessage(html)) .then(_ => history.replaceState(history.state, "", href)) } }

  • SurveyJS

    Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App. With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.

    SurveyJS logo
  • turbo-rails

    Use Turbo in your Ruby on Rails app

  • Important to switch the format to html to get our ‘post’ partial, don’t know if intended or bug.

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts

  • Common front-end tool library and high-frequency interview questions (continuously updated...)

    1 project | dev.to | 6 May 2024
  • IndexedDB con ExtJS

    3 projects | dev.to | 6 May 2024
  • Streamline Your Workflow: A Guide to Normalising Git Commit and Push Processes

    6 projects | dev.to | 5 May 2024
  • Build an awesome GitHub developer portfolio.

    1 project | dev.to | 5 May 2024
  • JavaScript Compare Dates: From Chaos to Clarity

    3 projects | dev.to | 5 May 2024