Just Use Phoenix LiveView_
mix phx.new happiness
installing dependencies...
cd happiness
mix phx.server
Your app is running at http://localhost:4000
Real-time apps without the JavaScript fatigue. Write backend and frontend in Elixir.
See it working. Right now.
No page reload. No JavaScript written. Just Elixir and LiveView.
Real-time Counter
↑ Click the buttons. Server responds instantly.
The Elixir Code
def handle_event("inc", _, socket) do
{:noreply, update(socket, :count, &(&1 + 1))}
end
No useState. No reducers. No Apollo.
Live Event Stream
Click the counter to see events...
What the hell is LiveView?
Phoenix LiveView is a library that enables rich, real-time user experiences with server-rendered HTML. It maintains a persistent connection over WebSockets between the client and server, allowing the server to push updates to the page instantly without writing any JavaScript. No API layer. No state synchronization bugs.
It's the reason Phoenix developers ship features while React developers are still configuring their build tools.
While you're debating Redux vs Zustand vs Jotai, Phoenix developers already deployed.
"But..."
Why it's great
Updates instantly.
WebSocket connection pushes changes. No polling. No stale data.
Write less code.
Your templates are your API. State lives on the server where it belongs.
Handle complexity.
Validation, errors, uploads—built in. One phx-change away.
Handle scale.
Render 100,000 items without breaking a sweat. Memory-efficient by design.
Know who's there.
Built-in user tracking. Show who's online, typing, viewing.
Broadcast easily.
Real-time updates across all users. One line of code.
Test everything.
LiveViewTest simulates user interactions. No browser needed.
Recover gracefully.
Process crashes? LiveView reconnects automatically. Users barely notice.
Compose freely.
Function components, stateful components, slots—organize your UI cleanly.
Escape hatch ready.
Need custom JS? Hooks integrate seamlessly. Best of both worlds.
Stop maintaining a React + GraphQL + Redux + 47 npm packages stack.
Stop syncing state between client and server.
Stop writing the same validation twice.
Just use LiveView and ship the feature.