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: src/content/reference/react-dom/flushSync.md
+18-17Lines changed: 18 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -139,21 +139,21 @@ Most of the time, `flushSync` can be avoided, so use `flushSync` as a last resor
139
139
### I'm getting an error: "flushSync was called from inside a lifecycle method" {/*im-getting-an-error-flushsync-was-called-from-inside-a-lifecycle-method*/}
140
140
141
141
142
-
React cannot `flushSync` in the middle of a render. If you call `flushSync` in render, it will noop and you'll see a warning:
142
+
React cannot `flushSync` in the middle of a render. If you do, it will noop and warn:
143
143
144
144
<ConsoleBlocklevel="error">
145
145
146
146
Warning: flushSync was called from inside a lifecycle method. React cannot flush when React is already rendering. Consider moving this call to a scheduler task or micro task.
0 commit comments