You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Replace on_hydrate and app-wide on_load with a first-class on_connect hook on the @rx.event decorator.
Details
When a client establishes a websocket connection, registered on_connect handlers fire automatically — no need for page-level on_load lists or the implicit on_hydrate mechanism. on_connect also fires on any initial session-establishing call.
This simplifies the lifecycle model:
Explicit: no hidden on_hydrate magic
Discoverable: registered in the same global event list as all other handlers
Composable: multiple handlers, priority ordering, same semantics as other registered events
Works naturally with the EventHandler redesign (1b) — on_connect handlers are just event handlers with a lifecycle trigger.
Activity
linear commentedon Mar 25, 2026
ENG-9168