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
React to changes and group local operations into transactions. Events are delivered asynchronously after a microtask. See [Event Handling](/docs/tutorial/event) and [Transaction Model](/docs/concepts/transaction_model).
800
+
React to changes and group local operations into transactions. Starting in v1.8, events are delivered synchronously; older releases require awaiting a microtask. See [Event Handling](/docs/tutorial/event) and [Transaction Model](/docs/concepts/transaction_model).
Copy file name to clipboardExpand all lines: pages/docs/tutorial/event.mdx
+5-9Lines changed: 5 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -19,7 +19,7 @@ with changes in the document state.
19
19
- When `LoroDoc.commit()` is explicitly called
20
20
- Automatically before an import or export operation
21
21
22
-
Note that events are emitted asynchronously after a microtask. If you need to handle events immediately after a commit, you should await a microtask:
22
+
Starting from `[email protected]`, events are emitted synchronously during the commit cycle. If you are using an older version (<=1.7.x),youwillstillneedtoawaitamicrotaskforthecallbackstofire.
0 commit comments