From c908d00fea80cf8c22af9ca9db1e5786bf38a3a7 Mon Sep 17 00:00:00 2001 From: Amit Merchant Date: Tue, 24 Dec 2019 20:34:31 +0530 Subject: [PATCH] Improved grammer. (#2635) * Update handling-events.md * Update handling-events.md --- content/docs/handling-events.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/content/docs/handling-events.md b/content/docs/handling-events.md index 175303c2..abf61eab 100644 --- a/content/docs/handling-events.md +++ b/content/docs/handling-events.md @@ -56,7 +56,7 @@ function ActionLink() { Here, `e` is a synthetic event. React defines these synthetic events according to the [W3C spec](https://www.w3.org/TR/DOM-Level-3-Events/), so you don't need to worry about cross-browser compatibility. See the [`SyntheticEvent`](/docs/events.html) reference guide to learn more. -When using React you should generally not need to call `addEventListener` to add listeners to a DOM element after it is created. Instead, just provide a listener when the element is initially rendered. +When using React, you generally don't need to call `addEventListener` to add listeners to a DOM element after it is created. Instead, just provide a listener when the element is initially rendered. When you define a component using an [ES6 class](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Classes), a common pattern is for an event handler to be a method on the class. For example, this `Toggle` component renders a button that lets the user toggle between "ON" and "OFF" states: @@ -142,7 +142,7 @@ The problem with this syntax is that a different callback is created each time t ## Passing Arguments to Event Handlers {#passing-arguments-to-event-handlers} -Inside a loop it is common to want to pass an extra parameter to an event handler. For example, if `id` is the row ID, either of the following would work: +Inside a loop, it is common to want to pass an extra parameter to an event handler. For example, if `id` is the row ID, either of the following would work: ```js