Tweak wording based on @landermkerbey's suggestion in #10433#issuecomment-324488168
Dan Abramov committed
Oct 4, 2017 at 21:44 UTC
a2efa51b9227a2224bb23006c33e4aa06afc8070
1 file changed
+1
-1
docs/tutorial/tutorial.md
+1
-1
@@ -393,7 +393,7 @@ Now when the square is clicked, it calls the `onClick` function that was passed
393
4. Board passed `onClick={() => this.handleClick(i)}` to Square, so, when called, it runs `this.handleClick(i)` on the Board.
394
5. We have not defined the `handleClick()` method on the Board yet, so the code crashes.
395
396
-Note that `onClick` on the DOM `<button>` component has a special meaning to React, but we could have called `onClick` prop in Square and `handleClick` in Board something else. It is, however, a common convention in React apps to use `on*` names for the handler prop names and `handle*` for their implementations.
396
+Note that DOM `<button>` element's `onClick` attribute has a special meaning to React, but we could have named Square's `onClick` prop or Board's `handleClick` method differently. It is, however, conventional in React apps to use `on*` names for the attributes and `handle*` for the handler methods.
397
398
Try clicking a square – you should get an error because we haven't defined `handleClick` yet. Add it to the Board class.
399