Conversation
|
Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please sign up at https://code.facebook.com/cla - and if you have received this in error or have any questions, please drop us a line at cla@fb.com. Thanks! If you are contributing on behalf of someone else (eg your employer): the individual CLA is not sufficient - use https://developers.facebook.com/opensource/cla?type=company instead. Contact cla@fb.com if you have any questions. |
|
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks! |
docs/tutorial/tutorial.md
Outdated
| ``` | ||
|
|
||
| This means that when the square is clicked, it calls the onClick function that was passed by the parent. The `onClick` doesn't have any special meaning here, but it's popular to name handler props starting with `on` and their implementations with `handle`. Try clicking a square – you should get an error because we haven't defined `handleClick` yet. Add it to the Board class: | ||
| This means that when the square is clicked, it calls the onClick function that was passed by the parent. The `onClick` in `renderSquare doesn't have any special meaning here, but it's popular to name handler props starting with `on` and their implementations with `handle`. Try clicking a square – you should get an error because we haven't defined `handleClick` yet. Add it to the Board class: |
There was a problem hiding this comment.
The `onClick` in `renderSquare doesn't have any special meaning here,
is missing ending tick after renderSquare
The `onClick` in `renderSquare` doesn't have any special meaning here,
| ``` | ||
|
|
||
| This means that when the square is clicked, it calls the onClick function that was passed by the parent. The `onClick` doesn't have any special meaning here, but it's popular to name handler props starting with `on` and their implementations with `handle`. Try clicking a square – you should get an error because we haven't defined `handleClick` yet. Add it to the Board class: | ||
| This means that when the square is clicked, it calls the onClick function that was passed by the parent. The `onClick` in `renderSquare` doesn't have any special meaning here, but it's popular to name handler props starting with `on` and their implementations with `handle`. Try clicking a square – you should get an error because we haven't defined `handleClick` yet. Add it to the Board class: |
There was a problem hiding this comment.
Can we just move this section about "no special meaning" above to where it's defined, and add a sentence here that this is where onClick has special meaning (because it's on an a built-in component like <button> rather than our custom Square).
|
Thanks for PR. We went with another solution in #9427 so closing this one. |
Specified which
onClickis being referred to. TheonClickin Square'srenderhas to be named onClick.