From 60935f01d66c2400ed992e2ddc51eab004ca09d6 Mon Sep 17 00:00:00 2001 From: Kyle Mathews Date: Sat, 4 Oct 2025 18:39:36 -0600 Subject: [PATCH] Update mutations.md --- docs/guides/mutations.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/guides/mutations.md b/docs/guides/mutations.md index 7607d76e4..c6e3967ef 100644 --- a/docs/guides/mutations.md +++ b/docs/guides/mutations.md @@ -203,7 +203,7 @@ Custom actions provide the cleanest way to capture specific types of mutations a The mutation lifecycle follows a consistent pattern across all mutation types: 1. **Optimistic state applied**: The mutation is immediately applied to the local collection as optimistic state -2. **Handler invoked**: The appropriate handler (`onInsert`, `onUpdate`, or `onDelete`) is called to persist the change +2. **Handler invoked**: The appropriate handler — either `mutationFn` or a Collection handler (`onInsert`, `onUpdate`, or `onDelete`) — is called to persist the change 3. **Backend persistence**: Your handler persists the data to your backend 4. **Sync back**: The handler ensures server writes have synced back to the collection 5. **Optimistic state dropped**: Once synced, the optimistic state is replaced by the confirmed server state