Skip to content

Commit

Permalink
Tweak README
Browse files Browse the repository at this point in the history
  • Loading branch information
gaearon committed Feb 9, 2021
1 parent 1f365b1 commit b7dc09f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/react-reconciler/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -216,10 +216,14 @@ This is a property (not a function) that should be set to `true` if your rendere
To implement this method, you'll need some constants available on the _returned_ `Renderer` object:

```js
// This object contains the constants:
const MyRenderer = Reconciler(HostConfig);
// For example, MyRenderer.DefaultEventPriority
```

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`):
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`.

Return one of these values:

* **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.

Expand Down

0 comments on commit b7dc09f

Please sign in to comment.