1
Phoenix Logo

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.

Phoenix hexdocs.pm/phoenix_live_view
This is LiveView

See it working. Right now.

No page reload. No JavaScript written. Just Elixir and LiveView.

Real-time Counter

0

↑ 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..."

"But I need a JavaScript framework for real interactivity"
LiveView handles clicks, forms, real-time updates, drag-and-drop, infinite scroll, and more. No JS framework required. You write Elixir. The server handles state. It just works.
"But Server-rendered can't be fast enough"
LiveView diffs are tiny. We're talking bytes, not kilobytes. It feels instant because Elixir processes are instant. WhatsApp handles 2 million connections per server with Erlang. You'll be fine.
"But I need offline support"
Do you though? Really? Most apps don't. If yours genuinely does, LiveView might not be the fit. But be honest with yourself first.
"But My team only knows JavaScript"
Elixir is surprisingly easy to learn. Pattern matching will change how you think about code. Your team will thank you in 3 months.
"But React has a bigger ecosystem"
Bigger isn't better. It's just more to maintain. LiveView ships with what you need. Forms, uploads, streams, presence—it's all there. No npm install anxiety.

Why it's great

Real-time

Updates instantly.

WebSocket connection pushes changes. No polling. No stale data.

No API Layer

Write less code.

Your templates are your API. State lives on the server where it belongs.

Forms

Handle complexity.

Validation, errors, uploads—built in. One phx-change away.

Streams

Handle scale.

Render 100,000 items without breaking a sweat. Memory-efficient by design.

Presence

Know who's there.

Built-in user tracking. Show who's online, typing, viewing.

PubSub

Broadcast easily.

Real-time updates across all users. One line of code.

Testing

Test everything.

LiveViewTest simulates user interactions. No browser needed.

Fault Tolerant

Recover gracefully.

Process crashes? LiveView reconnects automatically. Users barely notice.

Components

Compose freely.

Function components, stateful components, slots—organize your UI cleanly.

JS Hooks

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.

Phoenix hexdocs.pm/phoenix_live_view