Skip to content

Commit a305ded

Browse files
authored
Tweak wording based on @landermkerbey's suggestion in #10433#issuecomment-324488168
1 parent c6d3f1a commit a305ded

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tutorial/tutorial.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -393,7 +393,7 @@ Now when the square is clicked, it calls the `onClick` function that was passed
393393
4. Board passed `onClick={() => this.handleClick(i)}` to Square, so, when called, it runs `this.handleClick(i)` on the Board.
394394
5. We have not defined the `handleClick()` method on the Board yet, so the code crashes.
395395
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.
397397
398398
Try clicking a square – you should get an error because we haven't defined `handleClick` yet. Add it to the Board class.
399399

0 commit comments

Comments
 (0)