liveview-lifecycle
Installation
SKILL.md
LiveView Rendering Lifecycle
Critical Understanding
LiveView renders happen in TWO phases:
-
Static/Disconnected Render - Initial HTTP request, server-side HTML
- No WebSocket connection
- No live functionality yet
connected?(socket)returnsfalse
-
Connected Render - WebSocket established, full LiveView active
- Live updates work
- Events are handled
connected?(socket)returnstrue
The Problem: Uninitialized Assigns
During static render, socket assigns may not be fully initialized: