Hotwire vs React/Vue/Alpine/Whatsoever

This page summarizes the projects mentioned and recommended in the original post on /r/rails

Our great sponsors
  • SurveyJS - Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • stimulus_reflex

    Build reactive applications with the Rails tooling you already know and love.

  • good point, what do you think of stimulus reflex - https://docs.stimulusreflex.com/

  • optimism

    The missing drop-in solution for realtime remote form validation in Rails. (by leastbad)

  • I see it the following way: - Wrap a form into a Turbo Frame. - Attach a Stimulus controller to the form. - Listen for change events and perform a form submission (requestSubmit()) whenever an input value changed. - Use a specific parameter to distinguish real submissions from preview ones (e.g., by toggling a hidden input field value in the form): in the controller, do not call #save if it's a preview request; only render a form in response with validation errors. - The most challenging part: since the HTML contents of the form would be replaced, we need restore the cursor position and any new input data. I think, using morphdom solves this issue; that's how (I believe) Stimulus Reflex and optimism library in particular work.

  • 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
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