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
Copy file name to clipboardExpand all lines: docs/guides/mutations.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -203,7 +203,7 @@ Custom actions provide the cleanest way to capture specific types of mutations a
203
203
The mutation lifecycle follows a consistent pattern across all mutation types:
204
204
205
205
1.**Optimistic state applied**: The mutation is immediately applied to the local collection as optimistic state
206
-
2.**Handler invoked**: The appropriate handler (`onInsert`, `onUpdate`, or `onDelete`) is called to persist the change
206
+
2.**Handler invoked**: The appropriate handler — either `mutationFn` or a Collection handler (`onInsert`, `onUpdate`, or `onDelete`) — is called to persist the change
207
207
3.**Backend persistence**: Your handler persists the data to your backend
208
208
4.**Sync back**: The handler ensures server writes have synced back to the collection
209
209
5.**Optimistic state dropped**: Once synced, the optimistic state is replaced by the confirmed server state
0 commit comments