Skip to content

Commit b7dc09f

Browse files
committed
Tweak README
1 parent 1f365b1 commit b7dc09f

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

packages/react-reconciler/README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,10 +216,14 @@ This is a property (not a function) that should be set to `true` if your rendere
216216
To implement this method, you'll need some constants available on the _returned_ `Renderer` object:
217217

218218
```js
219+
// This object contains the constants:
219220
const MyRenderer = Reconciler(HostConfig);
221+
// For example, MyRenderer.DefaultEventPriority
220222
```
221223

222-
The constant you return depends on which event, if any, is being handled right now (in the browser, you can check this using `window.event && window.event.type`):
224+
The constant you return depends on which event, if any, is being handled right now. In the browser, you can check the current event using `window.event && window.event.type`.
225+
226+
Return one of these values:
223227

224228
* **Discrete events:** If the active event is _directly caused by the user_ (such as mouse and keyboard events) and _each event in a sequence is intentional_ (e.g. `click`), return `MyRenderer.DiscreteEventPriority`. This tells React that they should interrupt any background work and cannot be batched across time.
225229

0 commit comments

Comments
 (0)