Hotwire: When It Fits & When It Doesn't
Reducing Client-Side State Complexity
A large share of SPA complexity comes from synchronizing client-side state with the server -- caching, invalidation, race conditions. By keeping the server authoritative and sending fresh HTML on each interaction, Hotwire sidesteps much of that specific complexity class.
Not Strictly Tied to Rails
Hotwire's deepest tooling and integration is in the Rails ecosystem (where it originated), but the underlying Turbo and Stimulus JavaScript libraries are backend-agnostic and have been adopted with other server-side frameworks too.
Where Hotwire Fits Well
Content-and-forms-heavy applications with relatively traditional page-based navigation.
Teams already invested in a server-side MVC framework, wanting more interactivity without a parallel JSON API + SPA.
Applications where the primary client is a browser, not a mix of many heterogeneous consumers.
Where a Client-Side Framework Fits Better
Rich, highly stateful client-side interactions -- a complex drag-and-drop editor, for instance.
An application needing a fully decoupled JSON API consumed by many very different clients (web, native with custom UI, third-party integrations).
Evaluating the Fit
Because Hotwire's core trade-off is server-authoritative rendering versus client-owned state, a practical evaluation looks at how well an application's actual interaction patterns map onto page/fragment-level server round-trips versus needing rich, persistent client-side state.
Keep your own version of these notes — editable, searchable, and organised by your stack.
Start free