From b7dc09f53cf818121fba652b2d1a31d2923a5e52 Mon Sep 17 00:00:00 2001 From: Dan Abramov Date: Tue, 9 Feb 2021 16:13:56 +0000 Subject: [PATCH] Tweak README --- packages/react-reconciler/README.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/react-reconciler/README.md b/packages/react-reconciler/README.md index be5ce3c334784..1a96644519fe7 100644 --- a/packages/react-reconciler/README.md +++ b/packages/react-reconciler/README.md @@ -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.