Software Engineering • Nov 21, 2026 • 6 min read

Is There a Real Competitor to Phoenix LiveView? Rails and PHP Compared

Z

Ziyan Junaideen

Developer

A glowing violet phoenix above a continuous stream of data flowing from a server to a browser, beside a ruby and a plush blue elephant each sending single envelopes to their own browser windows

I spent ten years building with Ruby on Rails before most of my work moved to Elixir and Phoenix. There are few Elixir projects for contractors, so my next contract is very likely to be a Ruby one, and I've been catching up on where Rails is today. I've used Hotwire before, but it's been a few years, so one of my first questions was: how close does Rails get to LiveView now? And while I was at it, what about PHP?

The short answer is that Rails and PHP both have tools that let you write pages the way LiveView does. None of them work the way LiveView does underneath, and that difference matters.

This post covers the three alternatives I looked at, Hotwire, StimulusReflex and Laravel Livewire, and why I still think LiveView is the best of the group.

What LiveView actually is

The idea everyone shares is simple: render HTML on the server, keep JavaScript to a minimum, and still give users a page that updates as they interact with it.

LiveView's version of that idea depends on the BEAM, the Erlang virtual machine:

  • When a user opens a LiveView page, the server starts a lightweight process just for that user. That process holds the page's state (assigns) in memory for as long as the page is open.
  • The browser and that process talk over one persistent WebSocket. A click or keystroke sends a small event; the process updates its state and re-renders.
  • LiveView knows which parts of each template are static and which are dynamic, so it sends back only the values that changed, not whole chunks of HTML.
  • Because each page is just a process, the server can push updates at any time. Another process broadcasts on Phoenix.PubSub, the LiveView receives it in handle_info/2, and the user's page updates. Presence tracking is built in too.

Each of those processes is cheap, isolated and supervised. One user's crash doesn't affect anyone else, and a server can hold many thousands of them. That runtime is the part other languages can't copy easily.

Rails: Hotwire

Hotwire is the Rails default since Rails 7. It's made of Turbo and Stimulus, and it comes from Basecamp's long-running "HTML over the wire" approach (Turbolinks dates back to 2012). It wasn't built as a LiveView copy.

  • Turbo Drive turns link clicks and form submissions into fetch requests and swaps in the new page.
  • Turbo Frames update one section of a page from a normal request.
  • Turbo Streams send small instructions such as append or replace, either in an HTTP response or broadcast over Action Cable (WebSockets).
  • Turbo 8 added page refreshes with morphing. A model with broadcasts_refreshes tells subscribed pages to reload, and Turbo morphs the new HTML into the DOM. This is the closest Rails gets to LiveView's feel.
  • Stimulus handles behaviour that should stay in the browser.

What it's missing compared with LiveView:

  • No server-side state per page. Every interaction is a fresh request to a stateless controller, so state lives in the database, the session or the URL.
  • Bigger, coarser updates. You send rendered HTML fragments or re-render whole pages, not just the changed values.
  • Real-time is added on, not built in. A morph refresh means the browser fetches and renders the entire page again.
  • More wiring. Frame IDs, stream templates and Stimulus controllers are things you keep consistent by hand.

In fairness, Hotwire scales like any ordinary web app, works with HTTP caching, and Turbo works with any backend.

Rails: StimulusReflex

StimulusReflex is the Rails project that was explicitly modelled on LiveView. Reflexes are Ruby methods that browser events call over Action Cable, and they re-render the page or parts of it. Its companion library, CableReady, sends DOM changes from the server.

It got a lot of attention around 2019–2021, but Hotwire's arrival as the Rails default pulled most of the community away. The 3.5 line is now stable, with the latest release I could find in May 2025, but it's a niche choice. It also still runs on Ruby: there's no cheap per-user process, so reflexes re-run controller code or rebuild state on each event, and it can't match LiveView's model.

PHP: Laravel Livewire

Laravel Livewire was openly inspired by LiveView and is very popular. Filament, a widely used Laravel admin-panel builder, runs on it. Livewire 4 arrived in 2025 with single-file components, "islands" and optimistic UI directives. Symfony has a similar tool, UX Live Components.

Livewire turns LiveView's model inside out. The browser holds the state. Each component's public properties are serialized into the page as a snapshot with a checksum. Each interaction sends that snapshot back in an HTTP request. Laravel rebuilds the component, runs the action, re-renders it, and returns new HTML and a new snapshot, which Alpine merges into the page.

What it's missing compared with LiveView:

  • A full request per interaction. Each request boots the framework again unless you run Laravel Octane.
  • Database round trips. Eloquent models are stored as class name plus ID and reloaded from the database on every request.
  • State is limited and exposed. Only serializable values survive between requests, and the state is visible in the browser. The checksum stops tampering, but you still mark fields #[Locked] and authorize every action.
  • No native server push. You poll with wire:poll, or add Laravel Echo with Reverb or Pusher, and even then a push only triggers another request.
  • Whole-component HTML comes back each time, not just the changed values.

Its strength is the reverse of LiveView's weakness: the server keeps no state between requests, so it scales horizontally without effort, reconnects and deploys are painless, and it runs anywhere PHP runs.

Side by side

Phoenix LiveViewHotwire (Rails)StimulusReflex (Rails)Livewire (PHP)
Where state livesServer process per pageDatabase, session, URLRebuilt on each reflexSerialized in the browser
TransportOne persistent WebSocketHTTP, plus WebSocket for broadcastsAction Cable WebSocketHTTP request per interaction
What's sent backOnly changed valuesHTML fragments or whole pagesHTML or DOM operationsComponent HTML plus snapshot
Server pushNative (PubSub, handle_info)Turbo Stream broadcasts or refreshCableReady broadcastsPolling, or Echo with Reverb or Pusher
Fault isolationSupervised process per userPer requestPer requestPer request
Community todayStrong in ElixirRails default, very largeSmallVery large in Laravel

My conclusion

Hotwire and Livewire are good tools, and for CRUD screens, admin panels and forms they work well. Livewire's ecosystem is impressive. But they reach LiveView's way of writing apps by adding layers on top of a request/response model: re-running requests, reloading records, morphing whole pages, or bringing in a separate WebSocket service for pushes.

LiveView doesn't need those layers, because the BEAM already gives every user a cheap, isolated, long-lived process. Real-time updates, presence, collaborative screens and live dashboards are part of the normal programming model, not extras. Ruby and PHP runtimes don't offer that, so their frameworks chose different trade-offs.

So I don't see a real competitor to Phoenix LiveView yet. That won't stop me taking Rails work: Hotwire has matured a lot since I last used it, and I'm happy building with it again. But when a project is mostly about live, interactive, real-time interfaces, I'll still recommend Phoenix.

Discussion

0

You need to be logged in to post a comment.

Log in to Comment

No comments yet. Be the first to join the conversation.