-
Notifications
You must be signed in to change notification settings - Fork 88
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docs: Handling events #74
Conversation
Deploy preview for zh-hant-reactjs-org ready! Built with commit 1287887 |
content/docs/handling-events.md
Outdated
|
||
## Passing Arguments to Event Handlers {#passing-arguments-to-event-handlers} | ||
## 將 Argument 傳給 Event Handler {#passing-arguments-to-event-handlers} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The argument
may translate to 參數
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I translate parameter
as 參數
. Not sure what argument
should be, but I found this article saying it should be 引數
: https://notfalse.net/6/arg-vs-param. I've never heard of it before.
Should we leave it as it is or do 引數(argument)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated! Please take a look.
content/docs/handling-events.md
Outdated
|
||
In both cases, the `e` argument representing the React event will be passed as a second argument after the ID. With an arrow function, we have to pass it explicitly, but with `bind` any further arguments are automatically forwarded. | ||
以這兩個例子來說,`e` 這個 argument 所代表的 React 事件將會被當作 ID 之後的第二個 argument 被傳遞下去。在使用 arrow function 時,我們必須明確地將它傳遞下去,但若使用 `bind` 語法,未來任何的 argument 都將會自動被傳遞下去。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The argument
may translate to 參數
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done!
Co-Authored-By: Peng Jie <dean.leehom@gmail.com>
Co-Authored-By: Peng Jie <dean.leehom@gmail.com>
Co-Authored-By: Peng Jie <dean.leehom@gmail.com>
Co-Authored-By: Peng Jie <dean.leehom@gmail.com>
Co-Authored-By: Peng Jie <dean.leehom@gmail.com>
Co-Authored-By: Peng Jie <dean.leehom@gmail.com>
- Although the two have different meanings, we decide to translate the two as 參數 for clarity and consistency.
Hi all, here is my translation for
handling events
. Here are some terms I am not sure about:binding
/bind
: I am using綁定
here. I know some contributors don't like it, but I can't think of a better word for now. It also feels weird to use the English word. I am open to suggestions.listener
: not sure how to translate it.event handler
: not sure how to translate it. Sometimes I just refer to it as事件
.