Mount before connect
On a LiveView, an island normally mounts from the KeenApp
hook — which can't run until the socket connects. With
<.app eager>
the island is mounted by mountStatic()
the instant app.js
parses, so it paints without waiting. It starts with
live: null
and liveStatus: "pending"; when the socket connects, the
hook hands it the live
bridge and fires a keen:live-ready event.
Both cards below are the same
island. Reload and watch: the eager
one appears at once (amber, "waiting for live"), then turns green when
live connects; the default
one only appears after connect. Compare their first render
in the stats panel.
eager
paints before connect
default
waits for the hook
Live load statistics
Same shared bundle (requested + loaded once), two containers. The
first render
delta is the eager win: the eager card paints at
app.js
parse time, the default card only after the socket connects.