phoenix-liveview

Installation
SKILL.md

Phoenix LiveView Patterns

LiveView Lifecycle

A LiveView goes through two phases:

  1. Static Mount: Initial HTTP request (connected?: false)
  2. Connected Mount: WebSocket upgrade (connected?: true)
def mount(_params, _session, socket) do
  if connected?(socket) do
    # Subscribe to topics, start timers, etc.
    Phoenix.PubSub.subscribe(MyApp.PubSub, "topic")
  end

  {:ok, assign(socket, :data, [])}
end
Related skills
Installs
7
GitHub Stars
119
First Seen
Jan 29, 2026