elixir-liveview
Installation
SKILL.md
Phoenix LiveView Patterns
Expert guidance for building real-time, interactive web applications with Phoenix LiveView.
Lifecycle & State
- Keep
mount/3minimal — assign only what's needed for initial render - Use
handle_params/3for URL-driven state, notmount/3 - Prefer
assign_new/3overassign/3when value may already exist - Use
assign_async/3andstart_async/3for expensive operations - Never block
mount/3with slow database queries or API calls
# ✅ Good: Minimal mount, async loading
def mount(_params, _session, socket) do
{:ok, assign(socket, page_title: "Dashboard", loading: true)}
end