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: packages/react-reconciler/README.md
+10Lines changed: 10 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -207,6 +207,16 @@ This is a property (not a function) that should be set to something that can nev
207
207
208
208
You can proxy this to `queueMicrotask` or its equivalent in your environment.
209
209
210
+
#### `getCurrentEventPriority(fn)`
211
+
212
+
If there is no ongoing event (like `window.event` in the DOM), return `0`.
213
+
214
+
Else, return one of the numbers depending on the ongoing event type:
215
+
216
+
- For events originating from user input where each event is intentional (e.g. clicks), return `2`.
217
+
- For events originating from continuous user input (e.g. mouse move), return `1`.
218
+
- For any other events, return `0`.
219
+
210
220
#### `isPrimaryRenderer`
211
221
212
222
This is a property (not a function) that should be set to `true` if your renderer is the main one on the page. For example, if you're writing a renderer for the Terminal, it makes sense to set it to `true`, but if your renderer is used *on top of* React DOM or some other existing renderer, set it to `false`.
0 commit comments