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
{{ message }}
Repository navigation
rx.Field setter decorators with frontend compilation support #6230
Implement @field_name.setter decorator on rx.Field descriptors that auto-generates an event handler to set the var. For simple cases, rx.Field(..., setter=True) creates a default setter that assigns the value directly.
Frontend Compilation
Because these setters have trivial, known semantics (assign a value to a field), they can be compiled to JS that runs on the frontend. This is the bridge to Replicache optimistic mutations (1b-ii) — the frontend applies the setter immediately as a local mutation while the backend mutation is in flight. The user sees instant feedback with no round-trip.
For custom setters (@field_name.setter decorated functions), the same pattern applies if the setter body is simple enough to cross-compile. More complex setters fall back to backend-only execution with the optimistic mutation reverted on conflict.
Activity
linear commentedon Mar 25, 2026
ENG-9169