A deep-dive into how Inertia.js works by rebuilding it from scratch: a 50-line React client and a 16-line Rails renderer that implement the full Inertia protocol. The post explains the core idea (render HTML on first visit, JSON on subsequent visits via an X-Inertia header), walks through each feature as a small diff on that core (deploy refresh, forms with CSRF, partial reloads, deferred props), and argues that Inertia's wire format is small enough to read in one sitting. It concludes by auditing what the real inertia-rails gem adds on top and why that complexity is worth maintaining professionally.

17m read timeFrom evilmartians.com
Post cover image
Table of contents
Inertia.js in Rails: a new era of effortless integrationWet-on-wet: Turbolinks, 2012”Beat the devil out of it”: the mutationSimplicity, vanished?! Solving the mystery with Inertia.js + RailsA client in 50 linesThe Rails half in 16 linesKeep making happy little featuresEverybody needs a friend: features reusing featuresWhere the “real” complexity livesTalent is a pursued interest
1.8K Impressions