Hotwire vs Inertia.js: Which One Should You Use in Rails?

This title could be clearer and more informative.Try out Clickbait Shieldfor free (5 uses left this month).

A comparison of Hotwire and Inertia.js as approaches for building modern SPA-like Rails applications without a separate API. Hotwire sends server-rendered HTML over the wire using Turbo and stays within the Ruby/ERB ecosystem, while Inertia.js acts as a bridge between Rails controllers and React/Vue frontend components. The author favors Hotwire for solo developers and small teams due to no context switching between Ruby and JavaScript, no Node.js build step required (using Importmaps in Rails 7/8), simpler state management via Turbo Streams, and being the Rails default with full framework integration. Inertia.js is recommended only when migrating from an existing React/Vue component library.

4m read timeFrom norvilis.com
Post cover image
Table of contents
The Inertia.js Approach (The Modern Monolith)The Hotwire Approach (HTML Over The Wire)Why I Favor HotwireSummary
1 Comment

Sort: